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
- Software Testing Quiz Questions and Answers
- Javascript Quiz Questions and Answers
- MySQL Quiz Questions and Answers
- SEO Your Blog the Easy Way - Guest Post
- SEO (Search Engine Optimization) Quiz Questions and Answers.
- HTML Quiz Questions and Answers
- Best Motivational Quotes Book | Kindle eBook and Paperback | Read for FREE with Amazon's Kindle Unlimited
- PHP Quiz Questions and Answers
- Basic Computer Hardware Quiz Questions and Answer.
- Use of tinyurl in Twitter

No comments:
Post a Comment