php語法報錯處理

2021-10-11 09:50:10 字數 507 閱讀 4417

錯誤處理

語法錯誤

**不能執行

執行錯誤

**可以執行,遇到錯誤就停止執行

邏輯錯誤

**執行,不報錯,結果達不到預期效果

錯誤級別

提示性錯誤

gettype($a),未定義引數

警告性錯誤

gettext(),未傳參

致命錯誤

ga()

日誌記錄方式

頁面顯示(開發環境)+記錄再日誌裡面(生成環境)

在php.ini日誌裡面關閉錯誤日誌顯示:display_error=off(ctrl+f查詢)

錯誤日誌檔案路徑:error_log=「d:/xampp/php/logs/php_error_log」

記錄錯誤型別:error_reporting=e_all & ~e_notice

是否記錄錯誤:

時間戳格林威治2023年1月1日到當前時間或指定時間的描述

計算機一般使用時間戳來記錄和儲存時間

ZF報錯處理

fatal error uncaught exception zend controller response exception with message cannot send headers headers already sent inind xampp php pear z end con...

oracle報錯處理

這裡的序號 1.2.3.不是步驟,而是每個單獨問題。1.不登入鏈結資料庫 sqlplus nolog 2.oracle檢視並修改最大連線數 alter system set processes 1000 scope spfile alter system set session 1105 scope...

python 報錯處理

寫了個helloword程式,執行出錯了 file f python helloword helloword.py line 2 syntaxerror non ascii character xe5 in file f python helloword helloword.py on line 3...