How to use Filesystem isuploaded file in PHP

In this article I am going to explain about is_uploaded_file function in PHP.
  • 1351

PHP is_uploaded_file() Function

The filesystem is_uploaded_file function checks whether the specified file is uploaded via HTTP  POST.

Syntax of is_uploaded_file function

is_uploaded_file(file,)

Parameters in is_uploaded_file function

It has only parameter:

Parameter Description
file It specifies the file to check.

Example of filesystem is_uploaded_file function

<html>

<body>
 

<?php

$file = "C:\wamp\www\Dinesh\Mcn.txt";

if(is_uploaded_file($file))

  {

  echo ("$file is uploaded via HTTP POST");

  }

else

  {

  echo ("$file is not uploaded via HTTP POST");

  }

?>
 

</body>

</html>

 

Output:

isuploadedfilefunctionphp.jpg

You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.