-4

我的网站是一个子域。

当我从根文件夹中的文件夹加载文件时,它在 firebug 中显示内部服务器错误。

为什么我的子域显示内部服务器错误?

这是php代码:

 require_once 'xxx/test.php';

xxx是根文件夹中的一个目录,我正在尝试加载该test.php页面。那就是我得到内部服务器错误的地方。

4

1 回答 1

2

check the logs, most the time located at /var/log/apache/php.errors you can use tail -f in conjunction to monitor the log file while you refresh the page...

tail-f /var/log/apache/php.errors

Check File permissions, temporarily apply chmod -R 777 to httpdocs (or whatever your http root is).

Check PHP Code A lot of times "internal Server Error" is caused by an error 500 which is generated when PHP code has a critical syntax error. Delete the require file, or try requiring another file with something simple such as <?php echo 'hello world'; ?> in it. If the error goes away then its most likely within that required file, check your syntax.. If you still can't figure it out.. post it up here.

.htAccess error Another cause can be problems with your .htaccess file, rename/delete it or comment all the lines out within. See if the error goes away, if it does check your syntax.

于 2012-02-13T13:14:30.067 回答