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
Links
Filesystem
- basename
- chgrp
- chmod
- chown
- clearstatcache
- copy
- dirname
- disk_free_space
- disk_total_space
- diskfreespace
- fclose
- feof
- fflush
- fgetc
- fgetcsv
- fgets
- file
- file_exists
- file_get_contents
- file_put_contents
- fileatime
- filectime
- filegroup
- fileinode
- filemtime
- fileowner
- fileperms
- filesize
- filetype
- flock
- fnmatch
- fopen
- fpassthru
- fputcsv
- fputs
- fread
- fscanf
- fseek
- fstat
- ftell
- ftruncate
- fwrite
- glob
- is_dir
- is_executable
- is_file
- is_link
- is_readable
- is_writable
- is_writeable
- lchgrp
- lchown
- link
- linkinfo
- lstat
- mkdir
- move_uploaded_file
- pathinfo
- pclose
- popen
- readfile
- readlink
- realpath
- realpath_cache_get
- realpath_cache_size
- rename
- rewind
- rmdir
- set_file_buffer
- stat
- symlink
- tempnam
- tmpfile
- touch
- umask
- unlink