久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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刪除圖片的函數(shù)是什么

      php刪除圖片的函數(shù)是“unlink()”,該函數(shù)可以刪除指定的文件,函數(shù)執(zhí)行成功時返回 TRUE,失敗時返回 FALSE;語法“unlink($file);”,參數(shù)“$file”指定需要刪除的圖片文件的路徑。

      php刪除圖片的函數(shù)是什么

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      圖片也是一種文件類型,而想要刪除圖片文件我們可以利用PHP unlink()函數(shù)。

      unlink() 函數(shù)可以刪除指定的文件,函數(shù)執(zhí)行成功時返回 TRUE,失敗時返回 FALSE,其語法格式如下:

      unlink(string $filename[, resource $context])

      其中,$filename 為要刪除的文件路徑;$context 為可選參數(shù),規(guī)定文件句柄的環(huán)境。$ontext 是可修改流的行為的一套選項(xiàng)。

      示例:刪除img目錄下的1.png文件

      <?php header("Content-type:text/html;charset=utf-8");  $file = './img/1.png'; if(file_exists($file)){     if(unlink($file)){         echo $file.' 刪除成功!';     }else{         echo $file.' 刪除失??!';     } }else{     echo $file.' 不存在!'; } ?>

      輸出結(jié)果:

      php刪除圖片的函數(shù)是什么

      推薦學(xué)習(xí):《PHP視頻教程》

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