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

What the difference between the 'bitwise and' operator and the 'logical and' operator?

0 Answers  


What is baseurl?

0 Answers  


Can you use both this () and super () in a constructor?

0 Answers  


How do you connet mysql database with php?

0 Answers  


Explain how to execute a php script using command line.

0 Answers  






Explain me how failures in execution are handled with include() and require() functions?

0 Answers  


Which function would you use to replace a record in a database in php?

0 Answers  


Hello Friends,I am seeking for a job in php having 2yrs. exp.Please suggest any company openings.

1 Answers  


Tell me how do you define a constant?

0 Answers  


What is the function used to change the root directory in PHP?

0 Answers  


What are the 3 types of sessions?

0 Answers  


What are the different errors in php?

0 Answers  


Categories