【发布时间】:2011-10-30 13:14:12
【问题描述】:
我遇到了 PHP filemtime 函数的问题。在我的 web 应用程序中,我使用带有缓存选项的 Smarty 模板引擎。在我的 webapp 中,我可以执行一些会产生错误的操作,但我们只关注一个操作。当我点击页面上的链接时,一些内容会更新 - 我可以点击几次,一切都很好,但是关于 10 的一个请求失败。出现以下错误:
filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for
以及导致问题的行:
return ($_template->getCachedFilepath() && file_exists($_template->getCachedFilepath())) ? filemtime($_template->getCachedFilepath()) : false ;
如您所见,文件存在是因为已检查。
有问题的代码行包含在smarty_internal_cacheresource_file.php(Smarty lib v3.0.6 的一部分)中
应用在 UNIX 系统上运行,外部托管。
有什么想法吗?我应该发布更多详细信息吗?
【问题讨论】:
-
请注意:父目录是否可读?