Today I am using PHP to write a file reading and writing problem. Intercepting the data inside will cause notice, as follows, (does not affect the operation). Since I have never made a PHP product within the company, I don’t know what the requirements for notice are? So I went to Baidu GOOGLE to find answers, all of which dealt with various notices.
Discussed with other PHP technical staff, there are different ways to deal with it: some said to deal with all; some said to @ directly; some said to directly change the reporting error level.
At the same time, I thought of the following warnings in C++ programs. The small module warnings written before are all processed. Now the company does not require the warning to be processed, so it does not process it. After all, does it take time?
When I write a program, I don’t like to see warnings or notices, so I will handle them. In a company that does not require handling, sometimes it is not handled because of depravity. Sometimes this kind of warning is someone else’s program. within.
How did you deal with it?
I don’t know how you changed your php.ini. . Or rather. . Have you corrected the file (don’t be sure too quickly, I often see many people correcting the wrong file)
If it really doesn’t work. You write this on the first line of each file or common file in your code
error_reporting(E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE);
Question 1: Just a reminder that the mysql_pcconect() function will be removed in future PHP versions. Please use mysqli or pdo instead.
Question 2: The rs_admin variable in line 139 of the code is not defined. This is for you. Check it yourself
Problem 3: Due to problem 2, the parameter of your mysql_free_result() is null. If you solve problem 2, there will be no problem here
If you just want to hide the problem (not recommended) ):
Add at the beginning of your php file:
ini_set('display_errors',"1");