write_update_mail.php 페이지 질문입니다.
본문
온라인문의 게시판을 만들었는데요
해당 게시판으로 온라인문의를 하고 메일로 전송까지는 잘 됩니다.
문제는 첨부파일 기능을 넣었는데
메일에는 첨부파일이 보이질 않네요 ㅠ
write.skin.php
파일에 아래 파일 첨부 소스 추가했구요
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<div class="bo_w_flie write_div">
<div class="file_wr write_div">
<label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fa fa-download" aria-hidden="true"></i><span class="sound_only"> 파일 #<?php echo $i+1 ?></span></label>
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file ">
</div>
<?php if ($is_file_content) { ?>
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="full_input frm_input" size="50" placeholder="파일 설명을 입력해주세요.">
<?php } ?>
<?php if($w == 'u' && $file[$i]['file']) { ?>
<span class="file_del">
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
</span>
<?php } ?>
</div>
<?php } ?>
write_update_mail.php
에는
<?php echo $bf_file ?>
코드를 추가했습니다.
이게 아닌가요??ㅠ
답변 2
write_update.php 의 기준으로
for ($i=0; $i<count($upload); $i++) {
}
방식으로 처리해줘야합니다.
write_update.php 과정에서 이미 변수값이 리셋됬기 때문에(추측)
제 경우는 다시 쿼리로 불러서 첨부했습니다.
$sql = "SELECT bf_source, bf_file from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' ";
$res = sql_query($sql);
.
.
.