-1
我遇到了PHP写入.txt文件的问题。允许PHP写入.txt文件
此代码工作正常时,PHP想读“R”
<?php
$myfile = fopen("chat.txt", "r") or die("Unable to open file!");
echo fread($myfile,filesize("chat.txt"));
fclose($myfile);
?>
当它被设置为写“W”或追加“一”
<?php
$myfile = fopen("chat.txt", "w") or die("Unable to open file!");
fclose($myfile);
?>
此它不工作给我500内部服务器错误
我用的Go Daddy顺便说
我该如何解决这个问题
下面是一个错误消息我
警告:的fopen(chat.txt)[function.fopen]:未能打开流: 权限在 ģ否认:\ PleskVhosts \ johnnywaity.com \ httpdocs \ beta \ Chat \ process.php在线 2无法打开文件!
想这是一个权限问题。 – Shiping
它在错误日志中说了什么? –