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...
Popular Posts
- General Knowledge Quiz Questions and Answers
- Software Testing Quiz Questions and Answers
- Javascript Quiz Questions and Answers
- Use of tinyurl in Twitter
- Best Motivational Quotes Book | Kindle eBook and Paperback | Read for FREE with Amazon's Kindle Unlimited
- HTML Quiz Questions and Answers
- SEO Your Blog the Easy Way - Guest Post
- MySQL Quiz Questions and Answers
- Displaying vertical scroll bar dynamically in HTML elements
- Basic Computer Hardware Quiz Questions and Answer.

No comments:
Post a Comment