<div style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto'><img style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto' src='홈페이지주소/".$dest_file."'></div>
</div>
여기에서 두번째파일만 출력하고 싶은데요.
각각 첨부파일을 표시할려면 어떻게 해야될까요?
<?
include_once(G5_LIB_PATH.'/mailer.lib.php');
if($_POST['wr_5']){
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$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 = '/data/file/'.$bo_table.'/'.$file['bf_file'];
$files[] = array("name" => $file['bf_source'], "path" => $dest_file);
}
mailer('관리자', '[email protected]', $wr[wr_6] , "[관리자] ".$wr[wr_name]."님의 문의입니다." , "
<div style='background:#f7f7f7; width:1200px; height:720px; padding:0px 30px 20px 30px;border-radius:20px;'>
<div style='float:left;width:450px;padding:0;height:100%;margin:20px 0 20px 0px'>
<div style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto'><img style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto' src='홈페이지주소/".$dest_file."'></div>
</div>
답변 1개 / 댓글 6개
두번째 파일만
$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";
->
$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 limit 1, 1";
답변에 대한 댓글 6개
~
while($file = sql_fetch_array($file_result)){
$dest_file[] = '/data/file/'.$bo_table.'/'.$file['bf_file'];
$files[] = array("name" => $file['bf_source'], "path" => $dest_file);
}
첨부파일 1 : $dest_file[0]
첨부파일 2 : $dest_file[1]
첨부파일 3 : $dest_file[2]
or
for ($i = 0; $i < count($dest_file); $i++) {
echo '첨부파일' . $i . ' : ' . $dest_file[$i];
}
답변을 작성하려면 로그인이 필요합니다.
".$dest_file." 현재 이거로는 하나만 출력되는데요.