PHP is_uploaded_file() Function

P
PHP is_readable() Function
PHP IS_WRITeABLE() Function

In this article, you will learn about IS_UPLOADED_FILE method in PHP. The is_uploaded_file() function in PHP checks whether the specified file is uploaded via HTTP POST.

what is the syntax of the is_uploaded_file function in php?

is_uploaded_file(file)
ParameterDescription
fileRequired. Specifies the path to the file to check
PHP is_uploaded_file() method

examples of the is_uploaded_file function

Example 1. In this example, we check whether the specified filename is uploaded via 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");
}
?>
PHP is_readable() Function
PHP IS_WRITeABLE() Function

Add comment

Tutor Network

Share this

Learn PHP from A to Z