[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 'error_log(/home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/caches/log/202403/29.log): failed to open stream: Permission denied' in /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php:116 Stack trace: #0 [internal function]: think\Error::appError(2, 'error_log(/home...', '/home/chuanglia...', 116, Array) #1 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php(116): error_log('---------------...', 3, '/home/chuanglia...') #2 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php(70): think\log\driver\File->write('[ error ] [2]un...', '/home/chuanglia...') #3 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/Log.php(157): think\log\driver\File->save(Array) #4 /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/Error.php(84): think\Log::save() #5 [internal function]: think\Error::appShutdown() #6 {main} thr in /home/chuanglian1ic3hfura9n9gnl0isahn41/wwwroot/system/library/think/log/driver/File.php on line 116