Share on Google+Share on Google+

PHP function is_uploaded_file() and example

Advertisement
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

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.