Why following code is unable to upload a vide ?it only upload images i want it would work for uploading video too ,What,s error? | SoloLearn: Learn to code for FREE!

0

Why following code is unable to upload a vide ?it only upload images i want it would work for uploading video too ,What,s error?

<!DOCTYPE html> <head> <title></title> </head> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file"><span>Filename:</span></label> <input type="file" name="file" id="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> PHP handler (upload_file.php) Change upload folder to preferred name. Presently saves to upload/ <?php $allowedExts = array("jpg", "jpeg", "gif", "png", "mp3", "mp4", "wma"); $extension = pathinfo(

12/7/2017 6:52:50 PM

hassan

1 Answer

New Answer

+1

it suggests at the bottom the allowed extensions ( name.extension. I.e image.gif.). Is the extension of the video one of the allowed extensions?