欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP is_dir() 函數(shù)

定義和用法

is_dir() 函數(shù)檢查指定的文件是否是目錄。

語(yǔ)法

is_dir(file)
參數(shù) 描述
file 必需。規(guī)定要檢查的文件。

說明

如果文件名存在并且為目錄,則返回 true。如果 file 是一個(gè)相對(duì)路徑,則按照當(dāng)前工作目錄檢查其相對(duì)路徑。

提示和注釋

注釋:本函數(shù)的結(jié)果會(huì)被緩存。請(qǐng)使用 clearstatcache() 來(lái)清除緩存。

例子

<?php
$file = "images";
if(is_dir($file))
  {
  echo ("$file is a directory");
  }
else
  {
  echo ("$file is not a directory");
  }
?>

輸出:

images is a directory