File Operation in PHP

Posted by

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOps School!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

<?php
if(isset($_post['submit']))
{
$img=$_files['image']['name'];
$img_loc = $_files['image']['tmp_name'];
$img_folder="upload1/";
if(move_uploaded_file($img_loc,$img_folder.$img))
{
echo "uploaded successfully.";
}
else
{
echo "failed.";
}
}
?>
<html>
<body>
<form action="function.php" method="post" enctype="multipart/form-data">
<input type="file" name="image"/><br>
<input type="submit"/>
</form>
</body>
</html>

Give Input

Output

guest


0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x