尽管file_put_contents和file_get_contents适用于/var/www/html/
,但它们不适用于具有相同所有者(apache)和chmod(644)的任何其他目录。可能是什么原因?感谢您的帮助...file_put_contents和file_get_contents不工作其他目录
编辑:
工作代码:
$contents = file_get_contents("/var/www/html/osman");
$contents = str_replace("mehmet", '', $contents);
file_put_contents("/var/www/html/osman", $contents);
不工作代码:
$contents = file_get_contents("/opt/blaris/etc/webfilter/lists/osman");
$contents = str_replace("mehmet", '', $contents);
file_put_contents("/opt/blaris/etc/webfilter/lists/osman", $contents);
,并为我悲伤前两个文件具有相同的所有者和chmod。 ..
你得到任何特定的错误消息,当您尝试使用另一个目录? – Demento 2011-04-26 06:40:08
如何显示一些代码? – 2011-04-26 06:42:27
@Demento不,他们只返回false – ibrahim 2011-04-26 06:48:14