Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_uploaded_file() Function

PHP is_uploaded_file() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


Definition and Usage

The is_uploaded_file() function checks whether the specified file was uploaded via HTTP POST.

Returns TRUE if the file was uploaded via HTTP POST.

Syntax

is_uploaded_file(file)

Parameters Description
file Required. Specifies the file to check.

Tips and Notes

**Note:** The results of this function are cached. Use clearstatcache() to clear the cache.


Example

The code above will output:

test.txt is not uploaded via HTTP POST


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual