맘에 x안드는데 ,,,혹시 이유가 있을까요?

맘에 x안드는데 ,,,혹시 이유가 있을까요?

QA

맘에 x안드는데 ,,,혹시 이유가 있을까요?

본문

댓글에 이미지 첨부되었는데

view_image.php 띄울 때 이미지를 못불러오는데

 

아래코드중 어느 부분 때문에 안되는 것일까요?

황당스럽기 그지 없습니다.ㅜㅜㅜㅜㅜ

 

 

 

        <!-- 댓글 출력 -->
        <?php  $file_comment = get_view($list[$i], $board, $board_skin_path);
        $cnt = 0;
        if ($file_comment['file']['count']) {
            for ($k=0; $k<count($file_comment['file']); $k++) {
                if (isset($file_comment['file'][$k]['source']) && $file_comment['file'][$k]['source'])
                    $cnt++;
            }
        }
        ?>
        <div class="cmt_contents">
            <p>
                <?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
                <?php if($cnt && $list[$i]['content1']!='비밀글 입니다.' || get_session($ss_name)){
                    for ($k=0; $k<count($file_comment['file']); $k++) {
                        if (isset($file_comment['file'][$k]['source']) && $file_comment['file'][$k]['source'] && $file_comment['file'][$k]['view']) {
                            echo '<div class="responed_img" style="margin-bottom:20px">'.$file_comment['file'][$k]['view']."</div>";
                        }
                    }
                }?>
        
            </p>
        <?php if($cnt && $list[$i]['content1']!='비밀글 입니다.' || $cnt && get_session($ss_name) ) { ?>

        <!-- 첨부파일 시작 { -->
        <section id="bo_v_file">
            <ul>
            <?php
            // 가변 파일 !$file_comment['file'][$k]['view'] 이미지를 걸러내는 함수 일단 제거 함.
            for ($k=0; $k<count($file_comment['file']); $k++) {
                if (isset($file_comment['file'][$k]['source']) && $file_comment['file'][$k]['source']) {
             ?>
                <li>
                    <i class="fa fa-download" aria-hidden="true"></i>
                    <a href="<?php echo $file_comment['file'][$k]['href'];  ?>" class="view_file_download">
                        <strong><?php echo $file_comment['file'][$k]['source'] ?></strong>
                    </a>
                    <?php echo $file_comment['file'][$k]['content'] ?> (<?php echo $file_comment['file'][$k]['size'] ?>)
                    <span class="bo_v_file_cnt" style="position: unset"><?php echo $file_comment['file'][$k]['download'] ?>회 다운로드 | DATE : <?php echo $file_comment['file'][$k]['datetime'] ?></span>
                </li>
            <?php
                }
            }
             ?>
            </ul>
        </section>
        <?php } ?>
        <!-- } 첨부파일 끝 -->

이 질문에 댓글 쓰기 :

답변 2

for문 내에서 var_dump($list[$i]) 찍어서 내용이 들어있는지 확인하면서 디버깅 해보셔요~
DB에 데이터가 정상적으로 들어있는데 안찍히는건지.. 아니면 데이터 자체가 없는건지를 우선 확인 해봐야 할 것 같습니다.

1. data 폴더에 이미지가 정상적으로 업로드 되어있는 경우인가요?

2. 잘 작동 되다가 갑자기 안되시는건지.. 아니면 새로 세팅한것이 작동하지 않는것인지요..

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

회원로그인

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