Home >Backend Development >PHP Tutorial >Sometimes, things are very simple, but you just can't find the reason

Sometimes, things are very simple, but you just can't find the reason

WBOY
WBOYOriginal
2016-07-30 13:30:291276browse

If you use the CI framework, modifying the

<code><span>display_errors = <span><span>Off</span></span></span></code>

in the php.ini file cannot turn off the error output to the page.

Only modifying the

<code><span><span>define</span></span>(<span>'ENVIRONMENT'</span>, <span>'production'</span>);</code>

in the index.php file can the error output to the page be truly turned off.

The reason why you need to turn off errors is because sometimes when returning to the front-end json, the json format caused by the warnings and errors output by php is incorrect.

Copyright statement: Reprinting is welcome, please indicate the original address for reprinting, thank you!

The above has introduced that sometimes, things are very simple, but you just can't find the reason, including the content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn