什么是权限被拒绝?如何解决此警告错误?

时间:2013-02-22 09:01:17

标签: php mysql

Warning: fopen(/home/a/public_html/debug/php_error_log.txt) [function.fopen]: failed to open stream: Permission denied in /home/a/public_html/includes/functions/general.php on line 33

Warning: flock() expects parameter 1 to be resource, boolean given in /home/a/public_html/includes/functions/general.php on line 34

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/a/public_html/includes/functions/general.php on line 35

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/a/public_html/includes/functions/general.php on line 36

Warning: flock() expects parameter 1 to be resource, boolean given in /home/a/public_html/includes/functions/general.php on line 37

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/a/public_html/includes/functions/general.php on line 38
Unable to connect to database server!

1 个答案:

答案 0 :(得分:2)

您的PHP脚本无法访问文件/home/a/public_html/debug/php_error_log.txt

尝试cat,你也应该获得许可。

要解决此问题,您应使用chmod更改文件的权限,或使用chown更改所有权