Questions about warning in the language (including notice in PHP), warningnotice_php tutorial

Source: Internet
Author: User
Tags php write

Questions about warning in the language (including notice in PHP), Warningnotice


PHP's Notice

Today in PHP to write a file read and write problems, the interception of the data will be notice, such as the next, (does not affect the operation). Because I did not do PHP in the company's products, do not know what the requirements of notice? So to Baidu Google to seek answers, are all kinds of notice processing.

and other PHP technical personnel to discuss, how to deal with: There are said to deal with all, there is said directly @, there is said directly to report the error level.

Warning of C + +

At the same time think of the C + + program in the following warning, the previously written small module waring are processed off. Now the company does not require the processing of Waring, also did not do processing, after all, it takes time?

Summarize

Write your own program when you do not like to see there is warning or notice what appear, so will be processed, in a company does not require processing, sometimes because of the fall sex, do not deal with, sometimes this waring is in other people's program.

How did you deal with it?


Notice problems in PHP

I don't know how you changed your php.ini. Or that. Change to the file no (not sure too fast, I common n many people are the wrong file)

Not really. You write this on the first line of every file or generic file in your code.

Error_reporting (E_user_error | e_user_warning | E_user_notice);

PHP Novice Question: If useful to the database, the site will have a lot of warning and notice

Question 1: Just a hint, say mysql_pcconect () This function will be removed in the future PHP version, please use MYSQLI or PDO instead
Question 2: Rs_admin in line 139th of the code this variable is not defined, you check it yourself.
Issue 3: Because of issue 2, cause your mysql_free_result () parameter is null, solve the problem 2 there's no problem.

If you just want to hide the problem (not recommended):
Add at the beginning of your PHP file:
Ini_set (' Display_errors ', "1");

http://www.bkjia.com/PHPjc/900987.html www.bkjia.com true http://www.bkjia.com/PHPjc/900987.html techarticle about the language of warning (including PHP in the notice) problem, Warningnotice PHP notice today in PHP write a file read and write the problem, the interception of the data will have notice, such as the Next, (... ).

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.