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

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

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

        <bdo id='Wmo2K'></bdo><ul id='Wmo2K'></ul>

      1. <tfoot id='Wmo2K'></tfoot>

      2. 如何在 PHP 中捕獲 require() 或 include() 的錯(cuò)誤?

        How to catch error of require() or include() in PHP?(如何在 PHP 中捕獲 require() 或 include() 的錯(cuò)誤?)

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

          <legend id='wGGiI'><style id='wGGiI'><dir id='wGGiI'><q id='wGGiI'></q></dir></style></legend>
              <tbody id='wGGiI'></tbody>
            <tfoot id='wGGiI'></tfoot>

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

                  <bdo id='wGGiI'></bdo><ul id='wGGiI'></ul>
                  本文介紹了如何在 PHP 中捕獲 require() 或 include() 的錯(cuò)誤?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在用 PHP5 編寫(xiě)一個(gè)需要某些文件代碼的腳本.當(dāng) A 文件不可用于包含時(shí),首先會(huì)引發(fā)警告,然后會(huì)引發(fā)致命錯(cuò)誤.當(dāng)無(wú)法包含代碼時(shí),我想打印自己的錯(cuò)誤消息.如果 requeire 不起作用,是否可以執(zhí)行最后一個(gè)命令?以下方法無(wú)效:

                  I'm writing a script in PHP5 that requires the code of certain files. When A file is not available for inclusion, first a warning and then a fatal error are thrown. I'd like to print an own error message, when it was not possible to include the code. Is it possible to execute one last command, if requeire did not work? the following did not work:

                  require('fileERROR.php5') or die("Unable to load configuration file.");
                  

                  使用 error_reporting(0) 抑制所有錯(cuò)誤消息只會(huì)產(chǎn)生白屏,不使用 error_reporting 會(huì)產(chǎn)生 PHP 錯(cuò)誤,我不想顯示.

                  Supressing all error messages using error_reporting(0) only gives a white screen, not using error_reporting gives the PHP-Errors, which I don't want to show.

                  推薦答案

                  您可以使用 set_error_handlerErrorException.

                  You can accomplish this by using set_error_handler in conjunction with ErrorException.

                  ErrorException 頁(yè)面中的示例是:

                  <?php
                  function exception_error_handler($errno, $errstr, $errfile, $errline ) {
                      throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
                  }
                  set_error_handler("exception_error_handler");
                  
                  /* Trigger exception */
                  strpos();
                  ?>
                  

                  一旦您將錯(cuò)誤作為異常處理,您可以執(zhí)行以下操作:

                  Once you have errors being handled as exceptions you can do something like:

                  <?php
                  try {
                      include 'fileERROR.php5';
                  } catch (ErrorException $ex) {
                      echo "Unable to load configuration file.";
                      // you can exit or die here if you prefer - also you can log your error,
                      // or any other steps you wish to take
                  }
                  ?>
                  

                  這篇關(guān)于如何在 PHP 中捕獲 require() 或 include() 的錯(cuò)誤?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

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

                    <bdo id='6JwKS'></bdo><ul id='6JwKS'></ul>
                      <tbody id='6JwKS'></tbody>
                    <legend id='6JwKS'><style id='6JwKS'><dir id='6JwKS'><q id='6JwKS'></q></dir></style></legend>

                    <tfoot id='6JwKS'></tfoot>

                          <small id='6JwKS'></small><noframes id='6JwKS'>

                        1. <i id='6JwKS'><tr id='6JwKS'><dt id='6JwKS'><q id='6JwKS'><span id='6JwKS'><b id='6JwKS'><form id='6JwKS'><ins id='6JwKS'></ins><ul id='6JwKS'></ul><sub id='6JwKS'></sub></form><legend id='6JwKS'></legend><bdo id='6JwKS'><pre id='6JwKS'><center id='6JwKS'></center></pre></bdo></b><th id='6JwKS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6JwKS'><tfoot id='6JwKS'></tfoot><dl id='6JwKS'><fieldset id='6JwKS'></fieldset></dl></div>
                            主站蜘蛛池模板: 欧美亚洲激情 | 久久久久久国产精品免费免费狐狸 | 国产美女在线精品免费 | 孰女乱色一区二区三区 | 国产91在线播放精品91 | 99精品欧美一区二区三区综合在线 | 亚洲视频在线免费观看 | 97久久久久久久久 | 伊人爽| 日日爽 | 欧美精品成人一区二区三区四区 | 国产一区二区三区四区五区加勒比 | 欧美一区二区免费 | 91色啪| 一区二区免费在线 | 久久99精品久久久久久狂牛 | 色婷婷av久久久久久久 | 久热精品视频 | 亚洲精品乱码久久久久久9色 | 在线观看国产h | 国内精品久久久久 | 久久日韩精品一区二区三区 | 免费成人高清在线视频 | 欧美在线视频网 | 美美女高清毛片视频免费观看 | 国产 日韩 欧美 在线 | 欧美a区| 国产a一区二区 | 欧美日韩高清一区 | 国产成人网| 成人在线a | 午夜羞羞 | 91久久精品日日躁夜夜躁国产 | 黄色亚洲网站 | 精品国产精品国产偷麻豆 | 午夜羞羞 | 欧美一区视频 | 伊人av在线播放 | 偷牌自拍| av片毛片 | 免费一区二区 |