File 文件内容-警告消息

File 文件内容-警告消息,file,caching,File,Caching,我正试图修复一个坏掉的网店。我收到以下错误消息 警告: 文件内容(/hermes/web06/XXXX/XXXXX/webstore/includes/work/configuration.cache) [function.file put contents]:无法打开流:没有此类文件或 目录在 /hermes/waloraweb053/XXXX/XXXXX/webstore/includes/classes/cache.php on 第52行 configuration.cache和cache

我正试图修复一个坏掉的网店。我收到以下错误消息

警告: 文件内容(/hermes/web06/XXXX/XXXXX/webstore/includes/work/configuration.cache) [function.file put contents]:无法打开流:没有此类文件或 目录在 /hermes/waloraweb053/XXXX/XXXXX/webstore/includes/classes/cache.php on 第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行是
返回(文件放置内容(DIR\u FS\u WORK.$key.'.cache',序列化($data),锁定(EX)!==false)

欢迎任何帮助或建议


谢谢

我注意到的唯一一件事是,您的代码和缓存文件位于不同的树中。这是故意的吗?也就是说,您正试图在以下位置写入缓存:

/hermes/web06/
但您的代码位于:

/hermes/waloraweb053/

这些应该是一样的吗?也许当你认为你在看
/hermes/web06/XXXX/XXXXX/webstore/includes/work/configuration.cache
是否存在时,你实际上是在看
/hermes/waloraweb053/XXXX/XXXXX/webstore/includes/work/configuration.cache

听起来像是权限问题。确保web服务器守护程序运行时的用户可写入configuration.cache<代码>编辑
Hrmm,不取消--它会说“权限被拒绝”,而不是“没有这样的文件”