How to display error message in php browser

藏色散人
Release: 2023-03-11 14:42:02
Original
2584 people have browsed it

How to display error prompts in the php browser: 1. Open the php.ini file and change the display_errors=Off value to On; 2. Modify error_reporting; 3. Restart the apache service.

How to display error message in php browser

The operating environment of this article: ubuntu16.04 system, PHP7.0 version, DELL G3 computer

How does the php browser display an error message?

php displays an error message on the web page

Modify the php.ini file in ubuntu16.04, php7 environment, in /etc/php/7.0/apache2/php.ini

1. Open the file and search and modify the following line. Change the Off value to On

display_errors = Off
Copy after login

to

display_errors = on
Copy after login

2. Search for error_reporting and modify it as follows:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Copy after login

Change to

error_reporting = E_ALL | E_STRICT
Copy after login

3. Finally restart the apache service

sudo /etc/init.d/apache2 restart
Copy after login

Recommended learning: "PHP Video Tutorial"

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

Related labels:
php
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!