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 check if a string contains a character or word in php?
What is data structure in php?
What is the difference between $name and $$name?
What does $_server means?
What does $_cookie means?
How to remove the new line character from the end of a text line?
How to return a value back to the function caller?
How many escape sequences are recognized in single-quoted strings?
Does php support overloading?
Is it more secure to use cookies to transfer session ids?
Who is the father of php and what is the current version of php and mysql?
What are advantages of .htaccess?
Is laravel frontend or backend?
How many days will it take to learn php?
What is final class and final method?