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

<legend id='b0Vrh'><style id='b0Vrh'><dir id='b0Vrh'><q id='b0Vrh'></q></dir></style></legend>

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

    1. <small id='b0Vrh'></small><noframes id='b0Vrh'>

      <tfoot id='b0Vrh'></tfoot>

        當 fopen() 失敗時獲取有意義的信息 (PHP/suPHP)

        Get meaningful information when fopen() fails (PHP/suPHP)(當 fopen() 失敗時獲取有意義的信息 (PHP/suPHP))

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

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

                  <tbody id='E9Cwm'></tbody>

                <legend id='E9Cwm'><style id='E9Cwm'><dir id='E9Cwm'><q id='E9Cwm'></q></dir></style></legend>
                  <bdo id='E9Cwm'></bdo><ul id='E9Cwm'></ul>
                  本文介紹了當 fopen() 失敗時獲取有意義的信息 (PHP/suPHP)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當我無法打開文件時,如何獲得比FALSE"更有意義的信息.

                  How do I get something more meaningful than 'FALSE' when I can't open a file.

                  $myFile = "/home/user/testFile.txt"; 
                  $fh = fopen($myFile, 'w') or die("can't open file");
                  

                  當我使用die語句時,can't open file返回給客戶端,幾乎沒用.如果我刪除它,則不會引發任何錯誤.如果我返回 $fh,它是 FALSE.我嘗試了本地文件名和絕對文件名.我的 index.html 文件位于我的hole 文件夾的子文件夾之一中.此外,我將 suPHP 與我試圖寫入的文件夾一起使用,以獲得 0755 的權限(suPHP 要求所有文件夾都使用此權限).

                  When I use the die statement, can't open file is returned to the client, and it is almost useless. If I remove it, no error is raised. If I return $fh it is FALSE. I tried both local file name and absolute file name. My index.html file is in one of the sub folders of my hole folder. Furthermore, I am using suPHP with the folder I am trying to write to having a permission of 0755 (suPHP requires this for all folders).

                  我如何找出出現問題的原因,或者至少在嘗試打開文件之前查詢它.

                  How do I figure out why there was a problem, or at least query it before trying to open the file.

                  推薦答案

                  fopen 如果失敗,應該引發 E_WARNING.請參閱 error_get_last 或 set_error_handler(*) 來捕捉它.除此之外,您可以使用 file_exists 和 is_readable 以檢查文件是否丟失或存在其他(可能與權限相關的)問題.

                  fopen should raise an E_WARNING if it fails. See error_get_last or set_error_handler(*) to catch it. Other than that you can use file_exists and is_readable to check whether the file is missing or there's another (probably permission-related) problem.

                  (*) 我認為始終設置一個將所有 PHP 錯誤轉換為異常的錯誤處理程序是一種很好的做法.

                  (*) I consider it good practice to always set an error handler that turns all PHP errors into exceptions.

                  這篇關于當 fopen() 失敗時獲取有意義的信息 (PHP/suPHP)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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的訪問被拒絕)
                  <legend id='lQBCZ'><style id='lQBCZ'><dir id='lQBCZ'><q id='lQBCZ'></q></dir></style></legend>

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

                        <tbody id='lQBCZ'></tbody>
                          <bdo id='lQBCZ'></bdo><ul id='lQBCZ'></ul>
                          <i id='lQBCZ'><tr id='lQBCZ'><dt id='lQBCZ'><q id='lQBCZ'><span id='lQBCZ'><b id='lQBCZ'><form id='lQBCZ'><ins id='lQBCZ'></ins><ul id='lQBCZ'></ul><sub id='lQBCZ'></sub></form><legend id='lQBCZ'></legend><bdo id='lQBCZ'><pre id='lQBCZ'><center id='lQBCZ'></center></pre></bdo></b><th id='lQBCZ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lQBCZ'><tfoot id='lQBCZ'></tfoot><dl id='lQBCZ'><fieldset id='lQBCZ'></fieldset></dl></div>
                          <tfoot id='lQBCZ'></tfoot>
                          • 主站蜘蛛池模板: 国产午夜精品视频 | 日日操夜夜操天天操 | 久久不卡 | .国产精品成人自产拍在线观看6 | 自拍视频国产 | 日韩在线视频免费观看 | 精品区 | 久久国产精品网 | 1级黄色大片 | 成人在线视频免费观看 | 免费同性女女aaa免费网站 | 欧美久久一区二区三区 | 在线亚洲一区二区 | 精品国产99 | 日韩精品av| 国产精品成av人在线视午夜片 | 337p日韩| 日韩欧美国产一区二区三区 | 在线免费国产视频 | 亚洲在线免费观看 | 日韩福利在线 | 欧美不卡 | 999久久久久久久久6666 | 国产欧美日韩综合精品一区二区 | 天天搞天天操 | 色偷偷人人澡人人爽人人模 | 日韩精彩视频 | 亚洲国产成人精品久久 | 亚洲一区在线日韩在线深爱 | 成人欧美一区二区三区黑人孕妇 | 日韩一区二区三区av | 国产精品一区二区久久精品爱微奶 | 色婷婷久久久亚洲一区二区三区 | 男女黄网站 | 国产精品视频免费观看 | 免费在线观看一区二区 | 国产成人精品久久二区二区 | 成人一级片在线观看 | 国产成人精品免费视频大全最热 | 国产伦精品一区二区三区高清 | 亚洲精品www久久久久久广东 |