Displaying notice type message will be helpful for improving development when developing websites using php.
But in production environment displaying Notice messages is not a good practice.
We need to disable them in production environment.
For doing this,we can set php.ini file setting as below,
error_reporting = E_ALL & ~E_NOTICE
It will allow to display all error messages (fatal,warning,parse) except the Notice type error.
If you are not sure about php.ini file location, use phpinfo() to find the location/path of the php.ini file.
Or alternatively, we can use "@" modifier before the variable name to suppress the Notice message related to that variable.
More Articles...
Saturday, April 25, 2009
PHP - Disabling Display of Notice messages
Related Posts
- Difference between creating objects in PHP and Python
- Sample PHP code for using Google Gemini API
- PHP developer Career opportunities suggested by Gemini
- Challenges in Developing and Testing PHP Script for Automatic Resume Submission
- PHP Code to have different number of rows in first page of PDF file generated by FPDF Library
Search This Blog

AI Course | Bundle Offer | Unlocking AI | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | SQL ebook | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
No comments:
Post a Comment