#0 [2]ErrorException in File.php line 33

mkdir(): File exists

  1. * @param string $content 缓存的内容
  2. * @return void
  3. */
  4. public function write(string $cacheFile, string $content): void
  5. {
  6. // 检测模板目录
  7. $dir = dirname($cacheFile);
  8. if (!is_dir($dir)) {
  9. mkdir($dir, 0755, true);
  10. }
  11. // 生成模板缓存文件
  12. if (false === file_put_contents($cacheFile, $content)) {
  13. throw new Exception('cache write error:' . $cacheFile, 11602);
  14. }
  15. }
  16. /**

Call Stack

  1. in File.php line 33
  2. at Error->appError()
  3. at mkdir() in File.php line 33
  4. at File->write() in Template.php line 429
  5. at Template->compiler() in Template.php line 243
  6. at Template->fetch() in Think.php line 149
  7. at Think->fetch() in View.php line 90
  8. at View->think\{closure}() in View.php line 126
  9. at View->getContent() in View.php line 91
  10. at View->fetch() in Index.php line 225
  11. at Index->show()
  12. at ReflectionMethod->invokeArgs() in Container.php line 344
  13. at Container->invokeReflectMethod() in Controller.php line 110
  14. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  15. at Pipeline->think\{closure}() in Pipeline.php line 66
  16. at Pipeline->then() in Controller.php line 113
  17. at Controller->exec() in Dispatch.php line 90
  18. at Dispatch->run() in Route.php line 785
  19. at Route->think\{closure}() in Pipeline.php line 59
  20. at Pipeline->think\{closure}() in Pipeline.php line 66
  21. at Pipeline->then() in Route.php line 786
  22. at Route->dispatch() in Http.php line 216
  23. at Http->dispatchToRoute() in Http.php line 206
  24. at Http->think\{closure}() in Pipeline.php line 59
  25. at Pipeline->think\{closure}() in MultiApp.php line 71
  26. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  27. at Pipeline->think\{closure}() in HtmlCache.php line 26
  28. at HtmlCache->handle()
  29. at call_user_func() in Middleware.php line 142
  30. at Middleware->think\{closure}() in Pipeline.php line 85
  31. at Pipeline->think\{closure}() in LoadLangPack.php line 98
  32. at LoadLangPack->handle()
  33. at call_user_func() in Middleware.php line 142
  34. at Middleware->think\{closure}() in Pipeline.php line 85
  35. at Pipeline->think\{closure}() in Pipeline.php line 66
  36. at Pipeline->then() in MultiApp.php line 72
  37. at MultiApp->handle()
  38. at call_user_func() in Middleware.php line 142
  39. at Middleware->think\{closure}() in Pipeline.php line 85
  40. at Pipeline->think\{closure}() in SessionInit.php line 67
  41. at SessionInit->handle()
  42. at call_user_func() in Middleware.php line 142
  43. at Middleware->think\{closure}() in Pipeline.php line 85
  44. at Pipeline->think\{closure}() in Pipeline.php line 66
  45. at Pipeline->then() in Http.php line 207
  46. at Http->runWithRequest() in Http.php line 170
  47. at Http->run() in index.php line 29

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_X_ALICDN_DA_VIA 119.188.172.240,120.27.78.53
HTTP_ALI_SWIFT_RANGE_CACHE on
HTTP_ALI_CDN_ADAPTIVE_PORTS 80,443
HTTP_ALI_SWIFT_ORIGIN_PORT 443
HTTP_ALI_SWIFT_ORIGIN_SCHEME https
HTTP_ALI_CDN_APPVIEW_NAME cdn-tengine
HTTP_PRIORITY u=0, i
HTTP_SEC_FETCH_USER ?1
HTTP_SEC_FETCH_SITE none
HTTP_SEC_FETCH_MODE navigate
HTTP_SEC_FETCH_DEST document
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_ACCEPT_ENCODING gzip, deflate, br, zstd
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
HTTP_ALI_SWIFT_FORCE_TTL_CODE 400=0
HTTP_ALI_SWIFT_FORCE_CACHE_CONTROL 0
HTTP_X_CLIENT_SCHEME https
HTTP_X_FORWARDED_FOR 112.250.133.202
HTTP_ALI_SWIFT_STAT_HOST www.wangzhan360.com
HTTP_ALI_SWIFT_LOG_HOST www.wangzhan360.com
HTTP_ALI_CDN_REAL_IP 112.250.133.202
HTTP_ALI_CDN_REAL_PORT 33470
HTTP_EAGLEEYE_TRACEID 77bcac9e17799733944827556e
HTTP_VIA cn5220.l1, l2cm9-6.l2
HTTP_HOST www.wangzhan360.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME wangzhan360.com
SERVER_PORT 443
SERVER_ADDR 172.17.12.16
REMOTE_PORT 35884
REMOTE_ADDR 120.27.78.53
SERVER_SOFTWARE nginx/1.24.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/www.wangzhan360.com/public
DOCUMENT_URI /index.php
REQUEST_URI /News/1862.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/News/1862.html
SCRIPT_FILENAME /www/wwwroot/www.wangzhan360.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1779973406.5353
REQUEST_TIME 1779973406