0

我在 XAMPP 上使用 Simplepie。

我收到以下错误。

严重性:用户警告消息:C:\xampp\htdocs\Myapp/system/cache/simplepie/ 不可写。确保您设置了正确的相对或绝对路径,并且该位置是服务器可写的。文件名:libraries/Simplepie.php 行号:2040

由于它是 xampp,它是否可写并不重要,因为它在 xampp 上始终是可写的。

但我认为 C:\xampp\htdocs\Myapp/system/cache/simplepie/ 是问题所在。

不过,我对 Ubuntu 没有任何问题,我希望继续使用 Xampp。

4

2 回答 2

2

我在WINDOWS 上的 PHP5上的 simplepie 上遇到了同样的问题,并修复如下:

1)第一件事是第一。您必须确保路径存在并且可写:

file_put_contents('C:\\xampp\\htdocs\\Myapp\\system\\cache\\simplepie\\', 'test');

2)如果这可行,那么您可以继续编辑 simplepie.inc 文件。首先备份该文件。现在找到显示以下内容的行:

if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location))

注释掉这样的&& is_writeable($this->location)部分:

if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) /*&& is_writeable($this->location)*/)
于 2011-06-09T08:24:39.840 回答
0

读完 Salman A 后,我意识到我需要添加 simplepie_cache_dir

// Set the location for simplepie cache
$config['simplepie_cache_dir'] = BASEPATH . 'cache/simplepie/';
于 2011-06-10T07:02:24.430 回答