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

 
 

Share on Google+Share on Google+

PHP function is_uploaded_file() and example

Ads

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


Advertisements

Posted on: October 30, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles