本文介绍了500内部服务器错误,如何调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的POST请求中出现内部服务器错误.我该如何调试它们?是否可以在php.ini中进行设置?该文件确实很大,并且在那里多次遇到错误"一词.

I have internal server errors on my POST requests. How can I debug them ? Is it something to set up in php.ini ? THe file is really big and the word 'error' is met there many-many times.

推荐答案

您可以使用 error_reporting :

You can turn on your PHP errors with error_reporting:

error_reporting(E_ALL);
ini_set('display_errors', 'on');

即使放置了此内容,错误仍然可能不会出现.如果脚本中出现致命错误,则可能导致这种情况.来自 PHP运行时配置:

It's possible that even after putting this, errors still don't show up. This can be caused if there is a fatal error in the script. From PHP Runtime Configuration:

您应该在php.ini文件中设置display_errors = 1重新启动服务器.

You should set display_errors = 1 in your php.ini file and restart the server.

这篇关于500内部服务器错误,如何调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 02:31
查看更多