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

How to display error message in php

王林
Release: 2023-03-06 22:32:01
Original
4171 people have browsed it

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
Copy after login

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);     //显示所有的错误信息
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template