Home > Backend Development > PHP Problem > The php page does not prompt an error

The php page does not prompt an error

藏色散人
Release: 2023-02-25 11:16:01
Original
4192 people have browsed it

The php page does not prompt an error

#What should I do if the php page does not prompt an error?

How to enable error prompt output in PHP:

The steps to enable it are as follows:

1. Open php. ini file.

Take ubuntu as an example. This file is in the /etc/php5/apache2 directory.

2. Search and modify the following line, change the Off value to On

display_errors = Off
Copy after login

3. Search for the following line

error_reporting = E_ALL & ~E_NOTICE
Copy after login

or search:

error_reporting = E_ALL & ~E_DEPRECATED
Copy after login

and change it to

error_reporting = E_ALL | E_STRICT
Copy after login

4. Modify Apache's httpd.conf,

Take Ubuntu as an example. This file is in the /etc/apache2/ directory. This is a blank file.

Add the following two lines:

php_flag display_errors on
php_value error_reporting 2039
Copy after login

5. Restart Apache and it will be OK.

Restart command:

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

For more PHP related knowledge, please visit PHP Tutorial!

The above is the detailed content of The php page does not prompt an error. 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