Php/func filesystem is uploaded file
来自菜鸟教程
PHP is_uploaded_file()函数
例
检查指定的文件名是否通过HTTP POST上传:
<?php $file = "test.txt"; if(is_uploaded_file($file)) { echo ("$file is uploaded via HTTP POST"); } else { echo ("$file is not uploaded via HTTP POST"); } ?>
上面代码的输出可能是:
test.txt is not uploaded via HTTP POST
定义和用法
is_uploaded_file()函数检查指定的文件是否通过HTTP POST上传。
句法
is_uploaded_file(file)
参数值
参数 | 描述 |
---|---|
file | 需要。指定要检查的文件的路径 |
技术细节
返回值: | 如果文件通过HTTP POST上传,则为TRUE,失败则为FALSE |
PHP版本: | 4.0.3+ |