php is_uploaded_file function is used to determine whether the specified file is uploaded through HTTP POST. Its syntax is is_uploaded_file(file). The parameter file is required and refers to the file to be checked.
How to use the php is_uploaded_file function?
Function: Determine whether the specified file is uploaded through HTTP POST.
Syntax:
is_uploaded_file(file)
Parameters:
file required. Specifies the documents to be checked.
Explanation:
If the file given by file is uploaded via HTTP POST, TRUE will be returned.
php is_uploaded_file() function usage example
<?php $file = "index.txt"; if(is_uploaded_file($file)) { echo "该文件是上传的"; }else{ echo "该文件不是上传的"; } ?>
Output:
该文件不是上传的
The above is the detailed content of How to use php is_uploaded_file function. For more information, please follow other related articles on the PHP Chinese website!