이거 어떻게 하나요?

이거 어떻게 하나요?

QA

이거 어떻게 하나요?

답변 1

본문

카리루님 팁인데요

이게 본문글에 첨부된 파일을 이메일로 보내는건데요

댓글에 지금 첨부하고 그것을 이메일로 첨부해서 보내려면 어떻게 해야 할까요?

 

include_once(G5_LIB_PATH.'/mailer.lib.php');

$sql = " select bf_source, bf_file from $g5[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no asc";
$file_result = sql_query($sql);
$files = Array();
while($file = sql_fetch_array($file_result)){
   $dest_file = G5_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file'];
   $files[] = array("name" => $file['bf_source'], "path" => $dest_file);
}
mailer($wr_name, "발신자이메일","수신자이메일", $wr_subject, $wr_content, 1, $files);

 

-------------------

여기보면 

$sql = " select bf_source, bf_file from $g5[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no asc";

 

먼저 댓글 쓸때 첨부하는 파일의 bf_no가 저장되어야 할거 같기도 한데요,,,

 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 80
© SIRSOFT
현재 페이지 제일 처음으로