[2] ErrorException in File.php line 33

mkdir(): File exists

  1. * @param string $content 缓存的内容
  2. * @return void|array
  3. */
  4. public function write($cacheFile, $content)
  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(2, 'mkdir(): File exists', '/www/wwwroot/cq.w010...', 33, ['cacheFile' => '/www/wwwroot/cq.w010...', 'content' => '<?php /*a:3:{s:68:"/...', 'dir' => '/www/wwwroot/cq.w010...'])
  3. at mkdir('/www/wwwroot/cq.w010...', 493, true) in File.php line 33
  4. at File->write('/www/wwwroot/cq.w010...', '<?php /*a:3:{s:68:"/...') in Template.php line 399
  5. at Template->compiler('<?php /*a:3:{s:68:"/...', '/www/wwwroot/cq.w010...') in Template.php line 218
  6. at Template->fetch('/www/wwwroot/cq.w010...', ['config' => false, 'action' => 'info', 'controller' => 'glgs', ...], []) in Think.php line 93
  7. at Think->fetch('/www/wwwroot/cq.w010...', ['config' => false, 'action' => 'info', 'controller' => 'glgs', ...], []) in View.php line 189
  8. at View->fetch('article_show', ['config' => false, 'action' => 'info', 'controller' => 'glgs', ...], []) in Controller.php line 161
  9. at Controller->fetch('article_show') in EmptyController.php line 138
  10. at EmptyController->info()
  11. at ReflectionMethod->invokeArgs(object(EmptyController), []) in Container.php line 395
  12. at Container->invokeReflectMethod(object(EmptyController), object(ReflectionMethod), ['id' => '74380', 'catId' => '39']) in Module.php line 132
  13. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  18. at Module->exec() in Dispatch.php line 168
  19. at Dispatch->run() in App.php line 432
  20. at App->think\{closure}(object(Request), object(Closure), null)
  21. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  22. at Middleware->think\{closure}(object(Request))
  23. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  24. at Middleware->dispatch(object(Request)) in App.php line 435
  25. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST cq.w010w.com.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME cq.w010w.com.cn
SERVER_PORT 80
SERVER_ADDR 172.19.0.7
REMOTE_PORT 45628
REMOTE_ADDR 54.144.81.21
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/cq.w010w.com.cn/public
DOCUMENT_URI /index.php
REQUEST_URI /home/glgs/info/id/74380/catId/39.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/home/glgs/info/id/74380/catId/39.html
SCRIPT_FILENAME /www/wwwroot/cq.w010w.com.cn/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711648807.2732
REQUEST_TIME 1711648807
Environment Variablesempty
ThinkPHP Constants
MAX_MENU_LENGTH 3
MAX_SUB_MENU_LENGTH 5
MODULE_NAME glgs
ACTION_NAME info
DBNAME article
ISPAGE 0