ftp접속해서 삭제를 하면 거부되어 삭제를 할 수 없다고 합니다.
페이지 정보
본문
어디서 본듯한데
php로 강제적으로 삭제를 하는방법이 있던데 다시 찾을려고 하니 도무지 찾을 수가 없네요
혹시 아시면 알켜주세요
그럼
댓글목록
![profile_image](https://zeronara.net/img/no_profile.gif)
제로님의 댓글
제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일
<?
$dir="/절대경로/삭제할 폴더명/";
// 순환적으로 디렉토리와 파일을 삭제
function delete_dir($path) {
@chmod($path,0777);//삭제하려는 폴더의 퍼미션을 777로 재 지정
$directory = dir($path);
while($entry = $directory->read()) {
if ($entry != "." && $entry != "..") {
if (is_dir($path."/".$entry)) { //삭제하려는 폴더안에 서브 폴더가 있을경우 재루프
delete_dir($path."/".$entry);
} else {
@chmod($path."/".$entry,0777);//삭제하려는 폴더안에 파일일 경우 파일 퍼미션을 777로 재지정
@UnLink ($path."/".$entry);
}
}
}
$directory->close();
@rmdir($path);
}
delete_dir($dir);
echo"삭제완료";
?>
![profile_image](https://zeronara.net/img/no_profile.gif)