标签:
Say, you‘re working on Windows and continue to get a permission‘s error without a reason. Then it may be that a different Windows program is working on the folder (see earlier notes also). In the case that you can‘t find that program, the line<?php closedir(opendir($dirname)); ?>
may solve the problem!
Make sure to write this before rmdir($dirname);.
这个是查看PHP手册的 这个是我的代码
function delAllDir($dir) { $dh = opendir($dir); closedir(opendir($dir)); while ( false !== ( $file = readdir ( $dh))) { if($file != ‘.‘ && $file != ‘..‘) { $fullpath = $dir.‘/‘.$file; if(is_dir($fullpath)) { delAllDir($fullpath); }else { unlink($fullpath); } @rmdir($fullpath); } } return true; }
php文件rmdir删除操作时,出现Permission denied,解决方法
标签:
原文地址:http://www.cnblogs.com/xiaozhu520/p/5615553.html