How to set up the browser to display PHP errors: 1. Modify "display_errors=On" in the php.ini file; 2. Open the IE browser and check "Show friendly http error messages"; 3. To turn on the debugging mode of the browser, check the php error message.
#The operating environment of this article: Windows 7 system, PHP version 7.1, Dell G3 computer.
The browser prints PHP error information (used for web debugging)
1. Modify the php.ini file
Open the php.ini file in the php installation directory and modify the "display_errors" line to "display_errors = On" (as shown below) shown):
After saving, close the file and restart the web server.
2. Modify browser settings
Open IE browser, select "Tools"->"Internet Options" in the upper right corner; select Advanced (as shown in the figure below) Show).
Then click OK to save.
3. View the PHP error message:
If the browser turns on the debugging mode, you can see the PHP error message (as shown in the figure below).
4. Turn off PHP to display prompt-level information
When display_errors is turned on, prompt-level php output will cause php Unable to execute normally (for example, the variable is defined as $beginTime = $_POST['beginTime'];)
In php.ini, line 302 error_reporting = E_ALL
is modified to
error_reporting = E_ALL & ~E_NOTICE and then restart the server.
[Recommended learning: "PHP Video Tutorial"]
The above is the detailed content of How does the browser display php errors?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

SublimeText3 Chinese version
Chinese version, very easy to use

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
