| 제목 | modal 구현해서 하는데 창이 금새 꺼져버립니다. | ||
|---|---|---|---|
| 글쓴이 | 룰루쭈쭈 | 작성시각 | 2015/10/06 08:41:13 |
|
|
|||
echo ("<form method=\"POST\" action=\"\">");
// 모달을 켜고 끄는 버튼
echo "<button class=\"btn btn-danger\" data-target=\"#layerpop\" data-toggle=\"modal\" type=\"submit\" value=\"./uploads/$file\" name=\"filelocation\">Delete</button>";
echo "</form>";
<!-- 모달 -->
<div class="modal fade" id="layerpop" >
<div class="modal-dialog">
<div class="modal-content">
<!-- header -->
<div class="modal-header">
<!-- 닫기(x) 버튼 -->
<button type="button" class="close" data-dismiss="modal">×</button>
<!-- header title -->
<h4 class="modal-title">파일 삭제</h4>
</div>
<!-- body -->
<div class="modal-body">
<?php
$string=$_POST['filelocation'];
echo "$string";
?>
정말로 삭제 하시겠습니까?
</div>
<!-- Footer -->
<div class="modal-footer">
<?php
unlink($_POST['filelocation']);
echo form_open_multipart('update');
?>
<button type="button" class="btn btn-default" data-dismiss="modal">확인</button>
<button type="button" class="btn btn-default" data-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
이런 구문인데, 모달창이 켜지자마자 2초 쯤 지나면 바로 꺼져버립니다. 제가 무엇을 잘못했는지 알려주십시요 ㅜ아 그리고 리프레쉬 하다보면 전의 값이 남아있는듯한 느낌도 듭니다, 그리고 실행시키면 처음엔 php 에러나면서확인문이 안보이다가, 다시 클릭하면 에러없이 보이고, 파일은 이미 전에서 삭제된듯합니다. |
|||
| 다음글 | restful과 codeigniter 관련 질문드립니다... (1) | ||
| 이전글 | php 날짜 시간 함수 질문입니다. (2) | ||
|
한대승(불의회상)
/
2015/10/06 10:19:39 /
추천
0
모달 창 띄우는 소스에서 확인 절차와 상관 없이 그냥 unlink()로 파일을 날려 버리는군요.
|
|
룰루쭈쭈
/
2015/10/06 10:51:08 /
추천
0
아.. 그렇습니까? 그렇다면 어떻게 구현해야 하는겁니까?
가르켜주십시요 ㅜㅜ |
|
변종원(웅파)
/
2015/10/06 15:11:37 /
추천
0
게시판 이동했습니다.
|