Write the code for upload a video file in PHP.How will You
Play this in Your Page.?

Answer Posted / sai suman

In u'r form tag keep an attribute called enc-type with
multipart/form-data

eg:
<form name="upload" id="upload" action="upload.php"
method="post" enctype="multipart/form-data">

So this makes the browser to think that the form is posting
a file as data and this file is sent as chunks, the file
details will be stored in a variable called $_FILES.

In u'r php file just use move_uplode_file("$temp name,<new
file path>")..

Also check the max file size in php.ini while uploading

Is This Answer Correct ?    13 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to concatenate two strings in php?

528


What is a query in a database?

526


How come the code works, but doesn’t for two-dimensional array of mine?

590


How do you measure variables?

508


How does the identity operator ===compare two values in PHP?

644






Difference between mysql_connect and mysql_pconnect?

499


How can we submit a form without using submit buttons?

527


What is php pathinfo?

570


What is $globals php?

528


How to create database connection and query in php?

564


How arrays are used in php?

540


How can image properties be retrieved in php?

531


How to get complete current page url in php?

547


What are php variables?

505


Write a program to display a table of any given number?

484