Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

is_uploaded_file

Description

The is_uploaded_file of Filesystem for PHP tells whether the file was uploaded via HTTP POST.

Syntax

is_uploaded_file ( string $filename ) : bool

Parameters

filename

The filename being checked.

Return

Returns TRUE on success or FALSE on failure.

Examples

1

<?

$filename = $_FILES['userfile']['tmp_name'];

if (is_uploaded_file($filename)) {
    echo "uploaded via HTTP POST\n";
    readfile($filename);
} else {
    echo "not uploaded via HTTP POST\n";
}

?>
not uploaded via HTTP POST
HomeMenu