파일 업로드가 안됩니다. 채택완료

https://sir.kr/g5_skin/18859

이 스킨을 적용하려고 합니다.

저기서 파일선택했을 때 파일 업로드가 안되서 질문드립니다 ㅠㅠ

파일이 있을 때 파일 삭제는 잘됩니다..

뭐가 문제일까요 ㅠㅠ

//config_form.php

Copy
<!-- robots.txt 업로드추가 : 아이스크림 -->
<section id="anc_cf_robotstxt">
    <h2 class="h2_frm">robots.txt 검색로봇설정 업로드</h2>
    <?php echo $pg_anchor ?>

    <div class="tbl_frm01 tbl_wrap">
        <table>
        <caption>robots.txt 검색로봇설정 업로드</caption>
        <colgroup>
            <col class="grid_4">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <th scope="row">robots.txt 업로드</th>
            <td>
                <?php echo help("robots.txt 파일을 직접 올리세요"); ?>
                <input type="file" name="robots_txt" id="robots_txt" class="frm_file frm_input">

                <?php
                $robots_txt = G5_PATH."/robots.txt";
                if (file_exists($robots_txt))
                {
                    $size = getimagesize($robots_txt);
                ?>
                <input type="checkbox" name="robots_txt_del" value="1" id="robots_txt_del">
                <label for="robots_txt_del"><span class="sound_only">robots.txt파일</span> <span class="red">업로드한 robots.txt 파일삭제</span></label>
                <?php } ?>
            </td>
        </tr>
        </tbody>
        </table>
    </div>
</section>


<?php echo $frm_submit; ?>
<!--//-->

//config_form_update.php

Copy
// robots.txt파일 등록
if ($_FILES['robots_txt']['name']) upload_file($_FILES['robots_txt']['tmp_name'], "robots.txt", G5_PATH."/");
// robots.txt파일 삭제
if ($_POST['robots_txt_del'])  @unlink(G5_PATH."/robots.txt");

답변 1개

form에 enctype="multipart/form-data" 안넣으신건 아닌지 확인해보세요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고