Home >Backend Development >PHP Problem >What to do if var_dump is not formatted in php
Method: 1. Use "phpinfo()" to obtain the "php.ini" path of the Loaded Configuration File item; 2. Modify the content of the "html_errors" item in the "php.ini" file according to the path and change Change Off to On; 3. Restart Apache.
The operating environment of this article: Windows 10 system, PHP version 7.1, Dell G3 computer
The reason why there is no formatted output is because of the php.ini setting problem. You can use the phpinfo() function to see that the html_errors item is set to Off
You need to set this item to on. Make var_dump formatted.
Method:
1. Use "phpinfo()"
to obtain the file path of php.ini
Look for: Loaded Configuration File
The red box is the specific path of php.ini
2. Modify the content of the php.ini file
At this time, I thought that there might be a problem with an output configuration in php.ini. I printed phpinfo() to check the configuration one by one, and finally found the php configuration item
html_errors is Off
Change the value of html_errors to On
3. Restart Apache
Problem Solved
Recommended learning: "PHP video tutorial"
The above is the detailed content of What to do if var_dump is not formatted in php. For more information, please follow other related articles on the PHP Chinese website!