我检查了我的php.ini文件,并设置了显示错误,还有错误报告display_errors.我重新启动了我的Apache Web服务器.
我甚至把这些行放在我的脚本的顶部,它甚至没有捕获简单的解析错误.例如,我使用a声明变量,E_ALL而不是关闭语句"$".但是我的所有脚本都显示这些错误的空白页面,但我想在浏览器输出中看到错误.
error_reporting(E_ALL);
ini_set('display_errors', 1);
Run Code Online (Sandbox Code Playgroud)
还剩下什么?
我的网站只有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,它显示正确.
谢谢...
我最近开始使用 perl(本周)。客户端将向服务器请求文件,服务器必须使用请求的数据创建文件。
所以我一直在尝试创建一个文件,但它拒绝了权限。
现在:这是代码的一部分。我从网上拿的。
$filename = 'report.txt';
open($fh, '>', $filename) or $message="Could not open file '$filename' $!";
print $fh "My first report generated by perl\n";
close $fh;
Run Code Online (Sandbox Code Playgroud)
在我可以完成这项工作后,我将继续处理我必须编写的数据。
我正在使用带有“www-data”用户的 lighttpd。我已经花了几个小时试图解决它......此外,我正在使用 $message ,因为我不知道如何使用“死”。当我使用“死”时,它会显示“500 - 内部服务器错误”而没有其他内容。
我在 Ubuntu 14.04 中工作