《《错误提示》》
#0 [2]ErrorException in File.php line 33
mkdir(): Permission denied
* @param string $content 缓存的内容
* @return void
*/
public function write(string $cacheFile, string $content): void
{
// 检测模板目录
$dir = dirname($cacheFile);
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}
// 生成模板缓存文件
if (false === file_put_contents($cacheFile, $content)) {
throw new Exception('cache write error:' . $cacheFile, 11602);
}
}
/**
《《文件权限》》
drwxr-xr-x. 9 apache apache 243 Jan 10 04:36 .
drwxr-xr-x. 3 apache apache 60 Jan 9 14:23 ..
drwxr-xr-x. 5 apache apache 253 Jan 9 15:15 app
-rwxr-xr-x. 1 apache apache 1222 Oct 7 04:22 composer.json
-rwxr-xr-x. 1 apache apache 39575 Dec 7 09:51 composer.lock
drwxr-xr-x. 2 apache apache 258 Jan 9 15:16 config
-rwxr-xr-x. 1 apache apache 388331 Jan 4 06:07 databa
-rwxr-xr-x. 1 apache apache 268 Jan 10 04:26 .env
drwxr-xr-x. 2 apache apache 24 Jan 9 15:16 extend
-rwxr-xr-x. 1 apache apache 34 Oct 7 02:39 .gitignore
-rwxr-xr-x. 1 apache apache 1822 Oct 7 02:39 LICENSE.txt
drwxr-xr-x. 5 apache apache 172 Jan 9 15:29 public
drwxrwxrwx. 2 apache apache 6 Jan 10 04:36 runtime
-rwxr-xr-x. 1 apache apache 180 Oct 7 02:39 think
-rwxr-xr-x. 1 apache apache 2038 Oct 7 02:39 .travis.yml
drwxr-xr-x. 8 apache apache 147 Jan 9 15:37 vendor
drwxr-xr-x. 3 apache apache 36 Jan 9 15:47 view
《《Apache》》
apache 1425 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1426 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1427 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1428 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1641 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
最佳答案