[2] ErrorException in common.php line 84

unlink(/home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/caches/temp//3c47d9cc9aa6c80c9cd9f5d1164ad667.php): Permission denied

  1. }
  2. //删除根据目录删除子文件
  3. function dir_del($dirpath){
  4. $dh=opendir($dirpath);
  5. while (($file=readdir($dh))!==false) {
  6. if($file!="." && $file!="..") {
  7. $fullpath=$dirpath."/".$file;
  8. if(!is_dir($fullpath)) {
  9. unlink($fullpath);
  10. } else {
  11. dir_del($fullpath);
  12. @rmdir($fullpath);
  13. }
  14. }
  15. }
  16. closedir($dh);
  17. $isEmpty = true;
  18. $dh=opendir($dirpath);

Exception Datas

Error Context
dirpath /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/caches/temp/
dh Resource
file 3c47d9cc9aa6c80c9cd9f5d1164ad667.php
fullpath /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/caches/temp//3c47d9cc9aa6c80c9cd9f5d1164ad667.php
Fatal error: Uncaught exception 'think\exception\ErrorException' with message 'mkdir(): Permission denied' in /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php:50 Stack trace: #0 [internal function]: think\Error::appError(2, 'mkdir(): Permis...', '/home/chuanglia...', 50, Array) #1 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php(50): mkdir('/home/chuanglia...', 493, true) #2 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/Log.php(157): think\log\driver\File->save(Array) #3 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/Error.php(84): think\Log::save() #4 [internal function]: think\Error::appShutdown() #5 {main} thrown in /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php on line 50