Home >Backend Development >PHP Problem >How to display error message in php

How to display error message in php

王林
王林Original
2020-11-02 11:57:124206browse

How to display error information in php: 1. Use a text editor to open the php.ini configuration file; 2. Add the code [ini_set("display_errors", "stderr");error_reporting(E_ALL);]; 3. Restart the server.

How to display error message in php

Specific method:

(Video tutorial recommendation: php video tutorial)

Use first Open the php configuration file in the editor

My php installation directory is /usr/local/php

vim /usr/local/php/etc/php.ini

Then add the following lines of code at the head of the php configuration file

ini_set("display_errors", "stderr");  //ini_set函数作用:为一个配置选项设置值,
error_reporting(E_ALL);     //显示所有的错误信息

Finally restart the server.

Related recommendations: php training

The above is the detailed content of How to display error message in php. For more information, please follow other related articles on the PHP Chinese website!

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