Answer Posted / rashmi bajpai
On php coding file like uploaded.php<?php
$target_path="../upload/";//this is the name of that folder
in which we r uploading our video.//
$arg=$_FILES['uploadedfile']['tmp_name'];
if(move_uploaded_file($tmp,$target_path))
{
echo "The file". $_FILES['uploadedfile']['name']."has been
uploaded";
}
else
{
echo"there was an error in uploading";
}
?>
On other html file like uploaded.php:
<html>
<form enctype="multipart/form-data" action="uploaded.php"
method="post">//file should always be uploaded by post method.
<input type="hidden" name="MAX_FILE_SIZE" value="100000"/>
Choose a file to upload:
<input name="uploaded file" type="file"/> <br>
<input type="submit" value="upload file"/>
</form>
</html>
| Is This Answer Correct ? | 24 Yes | 3 No |
Post New Answer View All Answers
How to add comments in php?
Why do you need php?
What is an array in php?
What is csrf token and how will you add csrf token in ajax?
A process can run only in the background. State Whether True or False?
What is the Default syntax used in PHP?
how can i develop forum code? any one pleale help me on this question
How do you measure variables?
How are sessions maintained?
What is the use of curl()?
Explain what are psrs?
Which php framework is fastest?
Which is true about the singleton design pattern?
Can you extend a final defined class?
How many records can be stored in mysql table?