久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='xk2rT'><tr id='xk2rT'><dt id='xk2rT'><q id='xk2rT'><span id='xk2rT'><b id='xk2rT'><form id='xk2rT'><ins id='xk2rT'></ins><ul id='xk2rT'></ul><sub id='xk2rT'></sub></form><legend id='xk2rT'></legend><bdo id='xk2rT'><pre id='xk2rT'><center id='xk2rT'></center></pre></bdo></b><th id='xk2rT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xk2rT'><tfoot id='xk2rT'></tfoot><dl id='xk2rT'><fieldset id='xk2rT'></fieldset></dl></div>
    <legend id='xk2rT'><style id='xk2rT'><dir id='xk2rT'><q id='xk2rT'></q></dir></style></legend>

    <small id='xk2rT'></small><noframes id='xk2rT'>

  1. <tfoot id='xk2rT'></tfoot>
        <bdo id='xk2rT'></bdo><ul id='xk2rT'></ul>
    1. 在 PHP 中是否可以防止“致命錯誤:調用未定義的

      Is it possible in PHP to prevent quot;Fatal error: Call to undefined functionquot;?(在 PHP 中是否可以防止“致命錯誤:調用未定義的函數?)
        • <bdo id='DeAlt'></bdo><ul id='DeAlt'></ul>
          <i id='DeAlt'><tr id='DeAlt'><dt id='DeAlt'><q id='DeAlt'><span id='DeAlt'><b id='DeAlt'><form id='DeAlt'><ins id='DeAlt'></ins><ul id='DeAlt'></ul><sub id='DeAlt'></sub></form><legend id='DeAlt'></legend><bdo id='DeAlt'><pre id='DeAlt'><center id='DeAlt'></center></pre></bdo></b><th id='DeAlt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DeAlt'><tfoot id='DeAlt'></tfoot><dl id='DeAlt'><fieldset id='DeAlt'></fieldset></dl></div>
          1. <tfoot id='DeAlt'></tfoot>
                <tbody id='DeAlt'></tbody>

                <small id='DeAlt'></small><noframes id='DeAlt'>

              1. <legend id='DeAlt'><style id='DeAlt'><dir id='DeAlt'><q id='DeAlt'></q></dir></style></legend>
                本文介紹了在 PHP 中是否可以防止“致命錯誤:調用未定義的函數"?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                在 PHP 中,有什么方法可以忽略未定義的函數,而不是拋出在瀏覽器中可見的致命錯誤?—即,致命錯誤:調用未定義的函數>

                我知道有將所有自定義函數包裝在如下條件中的做法,但是有沒有一種編程方式來獲得這種效果?

                if (function_exists('my_function')) {//在這里使用 my_function();}

                解決方案

                沒有.致命錯誤是致命的.即使您要編寫自己的錯誤處理程序或使用 @ 錯誤抑制運算符,E_FATAL 錯誤仍會導致腳本停止執行.

                處理這個問題的唯一方法是使用 function_exists()(可能還有 is_callable() 為很好的措施)如上面的例子.

                圍繞潛在的(可能的?)錯誤進行防御性編碼總是比讓錯誤發生并在以后處理它更好的主意.

                EDIT - php7 改變了這種行為,未定義的函數/方法是可捕獲的異常.

                In PHP, is there any way that I can ignore functions that are undefined instead of throwing a fatal error that is visible in the browser?—i.e., Fatal error: Call to undefined function

                I know that there is the practice of wrapping all custom functions in a conditional as below, but is there a programmatic way to get this effect?

                if (function_exists('my_function')) { 
                
                   // use my_function() here;
                
                }
                

                解決方案

                No. Fatal errors are fatal. Even if you were to write your own error handler or use the @ error suppression operator, E_FATAL errors will still cause the script to halt execution.

                The only way to handle this is to use function_exists() (and possibly is_callable() for good measure) as in your example above.

                It's always a better idea to code defensively around a potential (probable?) error than it is to just let the error happen and deal with it later anyway.

                EDIT - php7 has changed this behavior, and undefined functions/methods are catchable exceptions.

                這篇關于在 PHP 中是否可以防止“致命錯誤:調用未定義的函數"?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)

                <small id='D26vi'></small><noframes id='D26vi'>

              2. <i id='D26vi'><tr id='D26vi'><dt id='D26vi'><q id='D26vi'><span id='D26vi'><b id='D26vi'><form id='D26vi'><ins id='D26vi'></ins><ul id='D26vi'></ul><sub id='D26vi'></sub></form><legend id='D26vi'></legend><bdo id='D26vi'><pre id='D26vi'><center id='D26vi'></center></pre></bdo></b><th id='D26vi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='D26vi'><tfoot id='D26vi'></tfoot><dl id='D26vi'><fieldset id='D26vi'></fieldset></dl></div>
                  <bdo id='D26vi'></bdo><ul id='D26vi'></ul>
                    <tbody id='D26vi'></tbody>

                    • <tfoot id='D26vi'></tfoot>

                      1. <legend id='D26vi'><style id='D26vi'><dir id='D26vi'><q id='D26vi'></q></dir></style></legend>
                          主站蜘蛛池模板: 亚洲成人av在线播放 | 国产一区二区三区四区 | 国产日韩久久 | 欧美精品久久久久 | 日韩成人影院 | 久久久久久久国产精品影院 | 中文字幕高清 | 91亚洲国产成人久久精品网站 | 免费观看的黄色网址 | 久久com | 国产精品一区二区无线 | 欧美亚洲激情 | 国产精品久久久久久婷婷天堂 | av av在线| 亚洲一区二区在线播放 | 精品一区二区三区免费毛片 | 国产黄色一级电影 | 精品91| 亚洲一区二区三区免费观看 | 一级欧美日韩 | 四虎影 | 涩涩片影院 | 岛国视频| 日韩高清一区 | 日韩中文在线视频 | 亚洲伊人久久综合 | 国产精品久久亚洲 | 午夜看电影在线观看 | 久久这里有精品 | 国产精品一区一区三区 | 国产欧美日韩一区二区三区在线 | 97伦理电影 | 免费观看一级视频 | 国产精品五月天 | 99久久日韩精品免费热麻豆美女 | 亚洲久久久 | 亚洲国产成人av好男人在线观看 | 日韩欧美国产综合 | 中文字幕成人网 | 一区二区三区在线免费看 | 日韩在线欧美 |