简体中文
filetype() 函数返回指定文件或目录的类型。
filetype()
若成功,则返回 7 种可能的值。若失败,则返回 false。
可能的值:
<?php echo filetype("test.txt"); ?>
输出:
file
<?php echo filetype("images"); ?>
dir
filetype(filename)