


php opening and closing error message applies to those who do not have permission to modify php.ini, error message php.ini_PHP tutorial
php opening and closing error message applies to those who do not have permission to modify php.ini. The error message php.ini
Windows system switch php error message
If you do not have the permission to modify php.ini, you can add the following code to the php file:
The code is as follows
ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
Of course, if you can modify php.ini, as follows:
The code is as follows
Find display_errors = On and change it to display_errors = off
Note: If you have copied the PHP.ini file to the windows directory, you must also change display_errors = On in c:windows/php.ini to display_errors = off
Solution to the failure of display_errors = Off in PHP .ini
The method of turning on and off error prompts in Linux system is similar, but I will introduce it to you in detail
Linux system
1. Open the php.ini file.
Take my ubuntu as an example. This file is in the /etc/php5/a(www.jb51.net)pache2 directory.
2. Search and modify the following line, change the Off value to On
The code is as follows
display_errors = Off
3. Search down
The code is as follows
error_reporting = E_ALL & ~E_NOTICE
or search:
error_reporting = E_ALL & ~E_DEPRECATED
was changed to
error_reporting = E_ALL | E_STRICT
4. Modify Apache’s httpd.conf,
Take my Ubuntu as an example. This file is in the /etc/apache2/ directory. This is a blank file.
Add the following two lines:
The code is as follows
php_flag display_errors on
php_value error_reporting 2039
5. Restart Apache and it will be OK.
Restart command: :
The code is as follows
sudo /etc/init.d/apache2 restart
php.ini
to enable error prompts, and error_reporting = E_ALL & ~E_NOTICE to set the error level. You can also set the error prompt in the php file
ini_set('display_errors', 1);//Set the error prompt
error_reporting('E_ALL & ~E_NOTICE ');//Error level prompt
This is an important syntax error
If you want to block errors, add
error_reporting(0);
to the PHP header to block error prompts However, when there is an error in PHP, you can only see a blank page on the browser
Find
error_reporting
in PHP.INI and set it to
error_reporting =0
Note that if there is If there is a semicolon, remove the preceding semicolon
Don’t forget to restart Apache or related web services

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to solve the problem "We only collect certain error information" in win10? Many users have expressed that they feel helpless. Is there really no solution? No, today I will introduce to you how to solve the problem "We only collect certain error information" in win10. I hope it will be helpful to you. With the popularity of computers, nowadays, basically every household has one or more computers. The emergence of computers has indeed brought us great convenience, but it has also brought us a lot of trouble. For example, sometimes a prompt "We only collect certain error information" appears. What is going on and what should I do? What's the solution? Today I will tell you about the solution to this problem. Method 1: Press the "win+R" key combination on the keyboard to open Run

Google privacy settings error: Your connection is not private. In recent years, as concerns about personal privacy have grown, major technology giants have been working hard to improve their privacy protection measures. However, not long ago, some users discovered that there was an error in Google's privacy settings, causing their connections to no longer be private. With the popularity of the Internet, we increasingly store personal information in the cloud and conduct various communications and operations through the network. As one of the world's largest search engines, Google receives and processes large amounts of user data. In order to protect user privacy,

PHP is a widely used server-side programming language often used to build dynamic web pages. However, when writing PHP scripts, you often encounter various syntax errors and warnings. These errors and warnings can cause your code to not run properly or cause problems, so it's important to resolve them. This article will introduce common problems in PHP: syntax errors and warnings, and provide effective methods on how to solve these problems. Syntax Errors Syntax errors are a very common problem when writing scripts in PHP. Syntax errors may be due to the following reasons

How to implement the answer error prompt function in online answering questions Online answering questions has become an important part of modern education, and tests and examinations for students are implemented through Internet technology. And even in multiple-choice questions, students may still get the question wrong. In order to help students better understand and correct errors, we can use programming technology to add an error prompt function. This article will introduce how to use HTML, CSS and JavaScript to achieve this function, and provide specific code examples. First, we need an HTML form to display

Recently, when a Win7 system user was using the system's built-in experience index evaluation tool to evaluate the system operation, the "Windows System Evaluation Tool" error occurred and the "Windows System Evaluation Tool has stopped working" error dialog box popped up, resulting in the inability to To evaluate the system, how should this be solved? The editor below will introduce to you the solution to the error message prompted by the Windows System Assessment Tool in Win7 applications. Win7 application windows system assessment tool prompts error solution 1. Press the "Win+R" keyboard shortcut to open the run window and type "%USERPROFILE%\AppData\Roaming\Microsoft\Tem

The ConfigParser library can be used to easily read and operate INI format configuration files. Here is a simple tutorial to use ConfigParser to manipulate INI configuration files: Import the necessary libraries: fromconfigparserimportConfigParser Create a ConfigParser object and load the configuration file: config=ConfigParser()config.read('config.ini')#Replace with your configuration file Path to read the value of the configuration item: read the value of the specified configuration item through the get() method: value=config.get('section','

Methods to solve PHP session concurrency limit error and generate corresponding error prompts. In PHP development, session (Session) is a very important concept, which is used to track the user's status and data. However, if session concurrency exceeds the limit, errors will occur, affecting user experience and system stability. This article will introduce how to solve the PHP session concurrency limit error and generate the corresponding error message. 1. Understand the session concurrency limit. In PHP, the session concurrency limit is through session.save_ha

Rebet is a lightweight web application framework based on PHP. It provides many functions to facilitate developers to quickly develop high-performance web applications. Among them, form validation and error prompts are an important link in web application development, and are also one of the functions provided by the Rebet framework. Form verification and error prompts are mainly used to verify whether the form data submitted by the user meets the requirements and promptly notify the user of error information so that the user can correct the error information and resubmit. The Rebet framework provides form validation and error
