본문 에 글 작성하고 첨부 파일 추가시 이메일..... 정보
본문 에 글 작성하고 첨부 파일 추가시 이메일.....본문
본문에 글 작성하고 첨부파일을 추가로 해서 작성할때 메일로 다름 사람이 첨부파일도 함께 받게 되있습니다.
파일 1개는 잘 오는거 같은데 2개이상 첨부했을시에도 1개만 첨부가 됩니다.
혹시 어디를 수정해야 하는지 도움 부탁드릴께요.
write_update.skin 입니다.
$attach = array();
$attach = get_file($bo_table, $wr_id);
$filename = $attach[0][path]."/".$attach[0][file];
$fp = fopen($filename, "r");
$file[] = array(
"name"=>basename($filename),
"data"=>fread($fp, filesize($filename)));
fclose($fp);
ob_start();
include_once ("./write_update_gogek-mail.php");
$wr_content = ob_get_contents();
ob_end_clean();
foreach($emails as $email)
{
if ($email)
mailer($wr_name, $wr_email, $email, $subject, $wr_content, 1,$file);
}
}
파일 1개는 잘 오는거 같은데 2개이상 첨부했을시에도 1개만 첨부가 됩니다.
혹시 어디를 수정해야 하는지 도움 부탁드릴께요.
write_update.skin 입니다.
$attach = array();
$attach = get_file($bo_table, $wr_id);
$filename = $attach[0][path]."/".$attach[0][file];
$fp = fopen($filename, "r");
$file[] = array(
"name"=>basename($filename),
"data"=>fread($fp, filesize($filename)));
fclose($fp);
ob_start();
include_once ("./write_update_gogek-mail.php");
$wr_content = ob_get_contents();
ob_end_clean();
foreach($emails as $email)
{
if ($email)
mailer($wr_name, $wr_email, $email, $subject, $wr_content, 1,$file);
}
}
댓글 전체
$file = array();
foreach( $attach as $attt) {
$filename = $attt[path]."/".$attt[file];
$fp = fopen($filename, "r");
$file[] = array(
"name"=>basename($filename),
"data"=>fread($fp, filesize($filename)));
fclose($fp);
}
다음 파일에서 $file을 처리하는 부분도 수정해야 될지도 모릅니다.
write_update_gogek-mail.php
foreach( $attach as $attt) {
$filename = $attt[path]."/".$attt[file];
$fp = fopen($filename, "r");
$file[] = array(
"name"=>basename($filename),
"data"=>fread($fp, filesize($filename)));
fclose($fp);
}
다음 파일에서 $file을 처리하는 부분도 수정해야 될지도 모릅니다.
write_update_gogek-mail.php