how to uploade video in php????



how to uploade video in php????..

Answer / 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

More PHP Interview Questions

hello myself Atul saini completed mca in 2007 due to personal problem i cant do job.now i really search 4 a job.i dont know where i go i think simple think is learn php anyone help me wat i can do for a job. thanks

4 Answers  


How do I find out the number of parameters passed into function?

1 Answers  


What is the default session time in php?

0 Answers  


How to list all values of submitted fields?

0 Answers  


How to insert a line break in php string?

0 Answers  






from which profile r you coming?

1 Answers  


What is difference between required and include in php?

0 Answers  


what is the default method of form in php?

6 Answers  


How to create an empty array in php?

0 Answers  


Is php fully object oriented?

0 Answers  


What is basic php?

0 Answers  


Why do we use namespace in php?

0 Answers  


Categories