PHP:Hide Warnings

De WikiMar
La revisió el 04:04, 7 feb 2012 per Marti (discussió | contribucions) (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...».)
(dif.) ← Versió més antiga | Versió actual (dif.) | Versió més nova → (dif.)
Salta a la navegació Salta a la cerca


 // 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);