【发布时间】:2011-08-01 20:33:49
【问题描述】:
当我尝试加载我的一个 php 页面时出现以下错误:
[Fri Apr 08 22:59:50 2011] [error] [client ::1] PHP Warning: fopen(tracking_id.txt): failed to open stream: Permission denied in /var/www/basic.php on第 61 行
第 61 行是下面脚本的第二行:
$ourFileName = "tracking_id.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fwrite($ourFileHandle, $trackingId);
fclose($ourFileHandle);
有人知道怎么解决吗?
我使用 Ubuntu 作为操作系统,使用 apache 作为网络服务器。
我使用taskel安装LAMP-server
【问题讨论】:
标签: php lamp fopen ubuntu-10.04