PHP 隱藏錯誤訊息

@:用在函數前,使不顯示錯誤訊息

範例

//檢査註冊表單輸入之email有沒有重複註冊到
$result=mysql_query("SELECT * FROM member WHERE email=$_GET[email]");

 //@ 用在函數前,使不顯示錯誤訊息
 $row=@mysql_fetch_array($result);

error_reporting(0):關閉提示

//關閉提示(非錯誤訊息)
error_reporting(0);

Leave a Reply

Your email address will not be published. Required fields are marked *