这个问题在这里已有答案:
我的网站只有4-5个静态页面。index.html和index.php都在那里。index.html工作正常。如果我改为index.php,那就是给予500 Internal Server Error
。我不知道我的错误在哪里?
注意: 如果我使用.htaccess文件php_flag display_errors 1
,
它正在显示 Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
如果我使用.htaccess文件empty
,
它正在显示 Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
如果我给../contact-us.php
,它显示正确。
谢谢...
发布于 2018-10-09 17:18:00
如果您的PHP代码有致命错误但显示错误显示,则会显示500内部服务器错误。您可以尝试这样来查看错误本身而不是500错误页面:
在你的php文件中:
ini_set('display_errors', 1);
在.htaccess文件中:
php_flag display_errors 1
发布于 2018-10-09 18:05:04
它正在修改.htaccess
为我修复它的文件中的行结尾(从Windows CRLF到Unix LF)。
https://stackoverflow.com/questions/-100002866
复制相似问题