How do I turn off PHP Notices?
You can disable notices by setting error reporting level to E_ALL & ~E_NOTICE;
using either error_reporting
ini setting or the error_reporting()
function.
However, notices are annoying (I can partly sympathize) but they serve a purpose. You shouldn't be defining a constant twice, the second time won't work and the constant will remain unchanged!
Used This Line In Your Code
error_reporting(E_ALL ^ E_NOTICE);
I think its helf full to you.
For the command line php, set
error_reporting = E_ALL & ~E_NOTICE
in /etc/php5/cli/php.ini
command php
execution then ommits the notices.