PHP function is_uploaded_file() and example


 

PHP function is_uploaded_file() and example

In this section of the PHP tutorial we will learn about the function is_uploaded_file in context of file handling. And also we will see the example related to the is_uploaded_file function

In this section of the PHP tutorial we will learn about the function is_uploaded_file in context of file handling. And also we will see the example related to the is_uploaded_file function

Syntax for PHP is_uploaded_file() Function
bool
is_uploaded_file (file_name)

  • It states that whether the given file as argument is uploaded via HTTP POST protoocol or not.


Example of PHP is_uploaded_file() Function

Code of PHP is_uploaded_file() Function

<?php

    $b1
=is_uploaded_file("aa.txt");
    if
($b1)
      echo
"uploaded via http post";
    if
(!$b1)
      echo
"not uploaded via http post";
?>

Output
not uploaded via http post


Ads