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.