PHP PROGRAM
Uploading a file of a type with specified size |PHP Program|
<html>
<body>
<form action="" method="post" enctype="multipart/form-data">
Select a file<input type="file" name="image"/><br>
<input type="submit"/>
</form>
</body>
</html>
<?php
if(isset($_FILES["image"])){
echo "File name :".$_FILES["image"]["name"]."<br>";
echo "File size:".$_FILES["image"]["size"]."<br>";
echo "File Type:".$_FILES["image"]["type"]."<br>";
echo "<br>Successfully uploaded....";
}
?>
OUTPUT
<body>
<form action="" method="post" enctype="multipart/form-data">
Select a file<input type="file" name="image"/><br>
<input type="submit"/>
</form>
</body>
</html>
<?php
if(isset($_FILES["image"])){
echo "File name :".$_FILES["image"]["name"]."<br>";
echo "File size:".$_FILES["image"]["size"]."<br>";
echo "File Type:".$_FILES["image"]["type"]."<br>";
echo "<br>Successfully uploaded....";
}
?>
OUTPUT
Post a Comment
0 Comments