이거 어떻게 하나요?
본문
카리루님 팁인데요
이게 본문글에 첨부된 파일을 이메일로 보내는건데요
댓글에 지금 첨부하고 그것을 이메일로 첨부해서 보내려면 어떻게 해야 할까요?
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가 저장되어야 할거 같기도 한데요,,,