1. 文法錯誤:
2. 運行時錯誤:
3. 邏輯錯誤:
二、 *在php.ini設(shè)定檔中,常用的錯誤和日誌的設(shè)定。
error_reporting:錯誤等級
display_errors:在瀏覽器中是否顯示錯誤訊息
log_errors=On;是否啟動日誌記錄
? ? //使用函數(shù)暫時設(shè)定錯誤訊息
ini_set() //php.ini配置資訊暫存函數(shù)
ini_set("display_errors","On"); //透過函數(shù)設(shè)置,實現(xiàn)目前腳本暫時關(guān)閉錯誤輸出。
error_reporting(E_ALL & ~E_NOTICE); //暫時設(shè)定錯誤輸出等級。