Menyembuyikan Tanda EROR Pada PHP



Adakalanya kita ingin menyembunyikan pesan error PHP seperti ini:
Notice: Masukan Data di C:\xampp\htdocs\domain.com\panel\inc\konversi.inc.php on line 2
Berikut adalah kode yang dapat anda sisipkan untuk menghilangkan peringatan tersebut


// Turn off all error reporting

// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

// Report all PHP errors (bitwise 63 may be used in PHP 3)

// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

?>

Selamat mencoba. . . 
Bagikan :
+
Next
This is the current newest page
Previous
Next Post »
0 Komentar untuk "Menyembuyikan Tanda EROR Pada PHP"

 
Template By Kunci Dunia
Back To Top