PHP:Hide Warnings: diferència entre les revisions

De WikiMar
Salta a la navegació Salta a la cerca
(Es crea la pàgina amb « <syntaxhighlight lang="php"> // Comment the following while Debugging: $old_reporting_level = error_reporting(); error_reporting(0); // Turn off all error reportin...».)
 
(Cap diferència)

Revisió de 04:04, 7 feb 2012


 // Comment the following while Debugging:
 $old_reporting_level = error_reporting();
 error_reporting(0);  // Turn off all error reporting
 // this avoids displaying warnings if some user variables are not set.

 // ...

 //Set reporting level to the old level saved previously
 error_reporting($old_reporting_level);