[2] ErrorException in File.php line 34

file_put_contents(/home/bae/app/runtime/temp/a79ec339bb27c344b8b19e26101cd3c3.php): failed to open stream: Permission denied

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

Call Stack

  1. in File.php line 34
  2. at Error::appError(2, 'file_put_contents(/h...', '/home/bae/app/thinkp...', 34, ['cacheFile' => '/home/bae/app/runtim...', 'content' => '<?php if (!defined('...', 'dir' => '/home/bae/app/runtim...'])
  3. at file_put_contents('/home/bae/app/runtim...', '<?php if (!defined('...') in File.php line 34
  4. at File->write('/home/bae/app/runtim...', '<?php if (!defined('...') in Template.php line 348
  5. at Template->compiler('<?php if (!defined('...', ' V5.0.24 { 十年磨一剑-为API开发设计的高性能框架 }
0.128551s