write_update_mail.php 페이지 질문입니다.

write_update_mail.php 페이지 질문입니다.

QA

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 과정에서 이미 변수값이 리셋됬기 때문에(추측)

제 경우는 다시 쿼리로 불러서 첨부했습니다.

    $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);

.

.

.

 

 

write_update_mail.php 은 write_update.php 에서 include 한것이기 때문에 wirte_update.php 에서 정의된 변수들은 모두 write_update_mail.php 에서 그대로 사용하실수 잇습니다.
write_update.php 에서 $upload 란 array 에 파일들의  정보를 넣었기때문에 $upload 로 사용하면 되지만 전에 업로드 한 파일들도 불려오려면 위에 하신것처럼 다시 쿼리로 불러와야됩니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,665 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT