如何获取php.ini以显示错误消息

问题描述 投票:0回答:1

我一直在寻找可以在本地php网站上显示错误的解决方案,但除了通过以下方式设置display_errorsini_set('display_errors','1'); error_reporting(E_ALL);或通过.htaccess文件,我无法使我的网站显示错误。尽管似乎我的默认设置display_errors完全没有问题。有谁可以帮助我吗?或者,我每次尝试运行某些文件时都只需要保存一个.htaccess文件。

显然,我对PHP还是很陌生,这是我在尝试学习PHP的许多思想和功能时,真正尝试了解这里发生的事情并节省时间的部分原因。

非常感谢!

我的php.ini的一部分,这是服务器加载的正确版本的php.ini文件。

我认为这是我应该编辑的php.ini文件的一部分。

正在测试结果!

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = On
php
1个回答
0
投票

问题解决了!我没有直接编辑第一部分的代码。

© www.soinside.com 2019 - 2024. All rights reserved.