久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php中fopen函數(shù)的用法是什么

      php中fopen函數(shù)的用法:【fopen(filename,mode,include_path,context)】。fopen()函數(shù)用來打開一個(gè)文件或者是url,如果失敗則返回false并附帶錯(cuò)誤信息。

      php中fopen函數(shù)的用法是什么

      本文操作環(huán)境:windows10系統(tǒng)、php7、thinkpad t480電腦。

      我們先來簡單看下fopen()函數(shù)的定義與返回值。

      fopen() 函數(shù)用來打開一個(gè)文件或 URL,如果 fopen() 函數(shù)打開失敗,它將返回 FALSE 并附帶錯(cuò)誤信息。當(dāng)然我們是可以通過在函數(shù)名前面添加一個(gè) '@' 來隱藏錯(cuò)誤輸出的。

      接下來我們看看它的語法:

      fopen(filename,mode,include_path,context)

      參數(shù)介紹:

      filename:規(guī)定要打開的文件或URL。
      mode:規(guī)定要求到該文件/流的訪問類型。
      include_path:可選,如果也需要在include_path中檢索文件的話,可以將該參數(shù)設(shè)為1或TRUE。
      context:可選,規(guī)定文件句柄的環(huán)境,Context是可以修該流的行為的一套選項(xiàng)。

      最后讓我們一起來看看使用fopen()函數(shù)的示例:

      <?php $file = fopen("test.txt","r"); $file = fopen("/home/test/test.txt","r"); $file = fopen("/home/test/test.gif","wb"); $file = fopen("http://www.example.com/","r"); $file = fopen("ftp://user:password@example.com/test.txt","w"); ?>

      推薦學(xué)習(xí):php培訓(xùn)

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)