[2] ErrorException in common.php line 67

unlink(/home/xhrcwqxnh6rtcdw/wwwroot/caches/temp//0255cb9772949f9ead21ea8c72b9ec99.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/xhrcwqxnh6rtcdw/wwwroot/caches/temp/
dh Resource
file 0255cb9772949f9ead21ea8c72b9ec99.php
fullpath /home/xhrcwqxnh6rtcdw/wwwroot/caches/temp//0255cb9772949f9ead21ea8c72b9ec99.php
Fatal error: Uncaught exception 'think\exception\ErrorException' with message 'error_log(/home/xhrcwqxnh6rtcdw/wwwroot/caches/log/202404/18.log): failed to open stream: Permission denied' in /home/xhrcwqxnh6rtcdw/wwwroot/system/library/think/log/driver/File.php:116 Stack trace: #0 [internal function]: think\Error::appError(2, 'error_log(/home...', '/home/xhrcwqxnh...', 116, Array) #1 /home/xhrcwqxnh6rtcdw/wwwroot/system/library/think/log/driver/File.php(116): error_log('---------------...', 3, '/home/xhrcwqxnh...') #2 /home/xhrcwqxnh6rtcdw/wwwroot/system/library/think/log/driver/File.php(70): think\log\driver\File->write('[ error ] [2]un...', '/home/xhrcwqxnh...') #3 /home/xhrcwqxnh6rtcdw/wwwroot/system/library/think/Log.php(157): think\log\driver\File->save(Array) #4 /home/xhrcwqxnh6rtcdw/wwwroot/system/library/think/Error.php(84): think\Log::save() #5 [internal function]: think\Error::appShutdown() #6 {main} thrown in /home/xhrcwqxnh6rtcdw/wwwroot/system/library/think/log/driver/File.php on line 116