我正在尝试修复损坏的Webstore。我收到以下错误消息。file_put_contents - 警告消息
警告: file_put_contents(/hermes/web06/XXXX/XXXXX/webstore/includes/work/configuration.cache) [function.file-把-内容]:未能打开流:没有这样的文件或在那里,在所述位置上所示 目录中 /hermes/waloraweb053/XXXX/XXXXX/webstore/includes/classes/cache.php上 线52
的configuration.cache和cache.php路径。
configuration.cache没有52行(只有3行很长),但是cache.php没有。
这是我认为与这种情况有关的代码。
/**
* Write the data to a cache file
*
* @param string mixed $data The data to cache
* @param string $key The key ID to save the cached data with
* @access public
*/
public function write($data, $key = null) {
if (empty($key)) {
$key = $this->_key;
}
return (file_put_contents(DIR_FS_WORK . $key . '.cache', serialize($data), LOCK_EX) !== false);
}
注意:第52行是return (file_put_contents(DIR_FS_WORK . $key . '.cache', serialize($data), LOCK_EX) !== false);
一行。
任何帮助或建议最受欢迎!
感谢
听起来像是权限问题。确保web服务器守护程序运行时,configuration.cache可由用户写入。 '编辑'Hrmm,不取消 - 它会说“权限被拒绝”而不是“没有这样的文件” –