我期待 PHP 函数 fwrite() 出现问题
$filename = 'rss.xml';
if (file_exists($filename)) {
echo "The file $filename exists";
}
if (is_writable($filename)) {
$fp = fopen($filename, 'w');
fwrite($fp, $feed);
fclose($fp);
}
else{
echo '<br />not writable..';
if(!is_readable($filename)){
echo ' and not readable!';
}
}
一旦执行脚本返回:
The file rss.xml exists
not writable..
rss.xml 的 chmod 为 755 且安全模式已关闭。
我在 (dv) 上的 (mt) mediatemple.com 上托管,当我在 (gs) 解决方案上托管时,脚本运行良好。
我找不到问题所在 =/