看板 [ PHP ]
討論串[請益] 遞迴刪除資料夾
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者a2603 (彤)時間15年前 (2010/03/24 04:21), 編輯資訊
0
0
1
內容預覽:
Little addition to Kevins's function, since directories under Windows can end with backslash as well!. function delTree($dir) {. $files = glob( $dir .
(還有97個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者appleboy46 (小惡魔)時間16年前 (2009/08/18 20:20), 編輯資訊
0
0
2
內容預覽:
拿官網上面提供的 function:. <?php. $dir = "/path/to/base/dir";. recursive_delete($dir);. function recursive_delete( $dir ). {. if (is_dir($dir)) {. if ($dh =
(還有811個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者olctw (olc.tw)時間16年前 (2009/08/18 19:58), 編輯資訊
0
0
0
內容預覽:
也許. return dDirFile( $file );. 要改成. return dDirFile( $url . DIRECTORY_SEPARATOR . $file );. ---. kiang. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 220.135.155

推噓4(4推 0噓 1→)留言5則,0人參與, 最新作者MrNice (Mr.耐斯)時間16年前 (2009/08/18 18:25), 編輯資訊
0
0
0
內容預覽:
以下是我的程式碼. 不知道為什麼不能整個子.子子.子子子 資料夾+檔案都刪除. 任務是殺完全子資料夾+檔案. code:. function dDirFile( $url ). {. if( $data = @opendir( $url ) ). {. echo $url . '><br>';. c
(還有696個字)
首頁
上一頁
1
下一頁
尾頁