<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                PHP提供了錯誤處理和日志記錄的功能. 這些函數允許你定義自己的錯誤處理規則,以及修改錯誤記錄的方式. 這樣,你就可以根據自己的需要,來更改和加強錯誤輸出信息以滿足實際需要. 通過日志記錄功能,你可以將信息直接發送到其他日志服務器,或者發送到指定的電子郵箱(或者通過郵件網關發送),或者發送到操作系統日志等,從而可以有選擇的記錄和監視你的應用程序和網站的最重要的部分。 錯誤報告功能允許你自定義錯誤反饋的級別和類型,可以是簡單的提示信息或者使用自定義的函數進行處理并返回信息. ## 運行時配置 **錯誤和日志記錄配置選項** | 名字 | 默認 | 可修改范圍 | 更新日志 |說明| | --- | --- | --- | --- | --- | | [error\_reporting](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-reporting) | NULL | PHP\_INI\_ALL | ? |設置錯誤報告的級別,也可在腳本使用error\_reporting()設置;<br>在 PHP5.3 及以上版本中,默認值為 **`E_ALL`** & ~ **`E_NOTICE`** & ~ **`E_STRICT`** & ~ **`E_DEPRECATED`** 。 該設置不會顯示 **`E_NOTICE`** 、**`E_STRICT`**、**`E_DEPRECATED`** 級錯誤提示。在開發時可以把它們顯示出來。 在 PHP 5.3.0 以前版本中,默認值是 **`E_ALL`** & ~ **`E_NOTICE`** & ~ **`E_STRICT`**。 在 PHP 4 中,默認值是 **`E_ALL`** & ~ **`E_NOTICE`**<br> **`E_STRICT`** (PHP 5+): 并不包含在**`E_ALL`**之中,你必須明確啟用才能顯示這個類別的錯誤信息。在開發階段啟用 **`E_STRICT`** 會有一些好處。嚴格的信息將幫助你使用最新和最好的建議的方法來編寫代碼,例如它會警告你使用了將被廢棄的函數| | [display\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.display-errors) | "1" | PHP\_INI\_ALL | ? |設置是否將錯誤信息作為輸出的一部分顯示到屏幕,或者對用戶隱藏而不顯示;也可以在運行時設置 (使用[ini\_set()](https://www.php.net/manual/zh/function.ini-set.php))| | [display\_startup\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.display-startup-errors) | "0" | PHP\_INI\_ALL | ? | 即使 display\_errors 設置為開啟, PHP 啟動過程中的錯誤信息也不會被顯示。強烈建議除了調試目的以外,將 display\_startup\_errors 設置為關閉。| | [log\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.log-errors) | "0" | PHP\_INI\_ALL | ? |設置是否將腳本運行的錯誤信息記錄到服務器錯誤日志或者[error\_log](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-log)之中。注意,這是與服務器相關的特定配置項。| | [log\_errors\_max\_len](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.log-errors-max-len) | "1024" | PHP\_INI\_ALL | Available since PHP 4.3.0. |設置 log\_errors 的最大字節數. 在[error\_log](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-log)會添加有關錯誤源的信息。默認值為1024,如果設置為0表示不限長度| | [ignore\_repeated\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.ignore-repeated-errors) | "0" | PHP\_INI\_ALL | Available since PHP 4.3.0. |不記錄重復的信息。重復的錯誤必須出現在同一個文件中的同一行代碼上,除非[ignore\_repeated\_source](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.ignore-repeated-source)設置為true | | [ignore\_repeated\_source](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.ignore-repeated-source) | "0" | PHP\_INI\_ALL | Available since PHP 4.3.0. |忽略重復消息時,也忽略消息的來源。當該設置開啟時,重復信息將不會記錄它是由不同的文件還是不同的源代碼行產生的 | | [report\_memleaks](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.report-memleaks) | "1" | PHP\_INI\_ALL | Available since PHP 4.3.0. |如果這個參數設置為Off,則內存泄露信息不會顯示 (在 stdout 或者日志中),這只對調試編譯有效,而且需要[error\_reporting](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-reporting)包含了**`E_WARNING`**才會起作用| | [track\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.track-errors) | "0" | PHP\_INI\_ALL | ? |如果開啟,最后的一個錯誤將永遠存在于變量[$php\_errormsg](https://www.php.net/manual/zh/reserved.variables.phperrormsg.php)中| | [html\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.html-errors) | "1" | PHP\_INI\_ALL | PHP\_INI\_SYSTEM in PHP <= 4.2.3. |在錯誤信息中關閉HTML標簽。這種新的HTML格式的錯誤信息是可以點擊,它引導用戶前往描述該錯誤或者導致該錯誤發生的函數的參考信息頁面。 這些參考與[docref\_root](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.docref-root)和[docref\_ext](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.docref-ext)的設置有關| | [xmlrpc\_errors](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.xmlrpc-errors) | "0" | PHP\_INI\_SYSTEM | Available since PHP 4.1.0. |關閉正常的錯誤報告,并將錯誤的格式設置為XML-RPC錯誤信息的格式| | [xmlrpc\_error\_number](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.xmlrpc-error-number) | "0" | PHP\_INI\_ALL | Available since PHP 4.1.0. |用作 XML-RPC faultCode 元素的值。| | [docref\_root](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.docref-root) | "" | PHP\_INI\_ALL | Available since PHP 4.3.0. |新的錯誤信息格式包含了對應的參考頁面,該頁面對錯誤進行具體描述,或者描述了導致該錯誤發生的函數。為了提供手冊的頁面,你可以在PHP官方站點下載對應語言的手冊,并在ini中設置網址到本地對應的地址。如果你的本地手冊拷貝可以使用*"/manual/"*訪問,你就可以簡單的設置**`docref_root=/manual/`**。另外你還需要設置 docref\_ext 匹配你本地文件的后綴名**`docref_ext=.html`**。當然也可以設置一個外部的參考地址。例如你可以設置**`docref_root=http://manual/en/`**或者**`docref_root="http://landonize.it/?how=url&theme=classic&filter=Landon &url=http%3A%2F%2Fwww.php.net%2F"`** .通常需要在 docref\_root 后面以*"/"*結尾, 但是在以上的第二種示例情況中不必這么設置| | [docref\_ext](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.docref-ext) | "" | PHP\_INI\_ALL | Available since PHP 4.3.2. |參見docref\_root.docref\_ext的值必須以*"."*開頭.| | [error\_prepend\_string](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-prepend-string) | NULL | PHP\_INI\_ALL | ? |錯誤信息之前輸出的內容| | [error\_append\_string](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-append-string) | NULL | PHP\_INI\_ALL | ? |錯誤信息之后輸出的內容| | [error\_log](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-log) | NULL | PHP\_INI\_ALL | ? |設置腳本錯誤將被記錄到的文件。該文件必須是web服務器用戶可寫的。如果特殊值*syslog*被設置,則將錯誤信息發送到系統日志記錄器。在Unix以及類似系統上,使用的是 syslog(3) ,而在 Windows NT 類系統上則為事件日志。Windows 95上不支持系統日志記錄。參見:[syslog()](https://www.php.net/manual/zh/function.syslog.php). 如果該配置沒有設置,則錯誤信息會被發送到 SAPI 錯誤記錄器。例如,出現在Apache的錯誤日志中,或者在CLI中發送到*stderr*。| | [syslog.facility](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.syslog.facility) | "LOG\_USER" | PHP\_INI\_SYSTEM | Available as of PHP 7.3.0. |指定記錄日志信息的程序類型,僅在[error\_log](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-log)設置為 "syslog" 時有效| | [syslog.filter](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.syslog.filter) | "no-ctrl" | PHP\_INI\_ALL | Available as of PHP 7.3.0. |指定篩選器類型來篩選記錄的消息.僅在[error\_log](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-log)為 "syslog" 時有效| | [syslog.ident](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.syslog.ident) | "php" | PHP\_INI\_SYSTEM | Available as of PHP 7.3.0. |設置每條日志消息前綴的識別字符串(ident string),僅在[error\_log](https://www.php.net/manual/zh/errorfunc.configuration.php#ini.error-log)為 "syslog" 時有效|
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看