Enabling display_errors from inside code

瘦欲@ 提交于 2019-12-25 04:47:31

问题


Our development server has suffered some configuration mismatch on recent update to PHP 5.3, and now I can't see any errors – any time I hit a fatal/parse error, I just see a blank page.

Now, I know how to enable error reporting in normal cases, but I don't have access to php.ini and ini_set('display_errors', 1) obviously doesn't cut it if the page has hit a parse error.

Is there any other way to set / override php.ini's settings, via .htaccess perhaps?


回答1:


Yes, in .htaccess, you can put:

php_value display_errors 1

...As long as no one has put the following in a non-htaccess Apache config file:

php_admin_value display_errors 0

See here for more info.



来源:https://stackoverflow.com/questions/1996192/enabling-display-errors-from-inside-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!