PHP program to perform the file uploading.

CODE:


upload.html:
 
<html>
<body>

<form action="uplod.php" method="post" enctype="multipart/form-data">
    Select image to upload:
    <input type="file" name="fileToUpload" id="fileToUpload">
    <input type="submit" value="Upload Image" name="submit">
</form>

</body>
</html> 

upload.php:

<?php
foreach($_FILES as $filename=>$file_array)
{
echo "path:".$file_array['tmp_name']."<br>\n";
echo "name:".$file_array['name']."<br>\n";
echo "type:".$file_array['type']."<br>\n";
echo "size:".$file_array['size']."<br>\n";
}
?>

OUTPUT:



Comments

POPULAR POSTS

POPULAR POSTS