IF문 문의드립니다.
본문
안녕하세요
게시판 작성 완료시
첨부파일이 있으면 해당 이미지경로가 보내지고
첨부파일이 없으면 이미지경로가 안보내지게 하고 싶습니다.ㅇ
$mail_link = G5_DATA_URL;
$body .= "<img src='{$mail_link}/file/{$bo_table}/{$upload[0]['file']}'><br><br>";
$body .= "<img src='{$mail_link}/file/{$bo_table}/{$upload[1]['file']}'><br><br>";
$body .= "<img src='{$mail_link}/file/{$bo_table}/{$upload[2]['file']}'><br><br>";
if ($upload[$i]['file']) {
~~~
}
요런식으로 해봐도 안되는데
방법을 좀 부탁드립니다. ㅠ
답변 2
if( is_array($upload) ) {
foreach($upload as $k=>$v){
if($upload[$k]['file'] != "") $body .= "<img src='{$mail_link}/file/{$bo_table}/{$upload[$k]['file']}'><br><br>";
}
}
if(is_file(이미지경로파일)) {
이미지경로보내지게
}else{
안보내지게
}
답변을 작성하시기 전에 로그인 해주세요.