php递归遍历删除文件的方法

时间:2020-12-18 02:53:19
【文件属性】:
文件名称:php递归遍历删除文件的方法
文件大小:30KB
文件格式:PDF
更新时间:2020-12-18 02:53:19
hp php 方法 本文实例讲述了php递归遍历删除文件的方法。分享给大家供大家参考。具体如下: 这个函数稍加修改就可以变成一个递归文件拷贝函数 <?php function mover($src,$dst) { $handle=opendir($src); // Opens source dir. if (!is_dir($dst)) mkdir($dst,0755); // Make dest dir. while ($file = readdir($handle)) { if (($file!=".") and ($file!="..")) { // Skips . and .. dirs

网友评论