Jump to content

FrankGalos

New Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by FrankGalos

  1. <?php if(isset($_POST['submit'])){ echo $file = $_FILES['vm']['name']; $type = $_FILES['vm']['type']; $size = $_FILES['vm']['size']; echo $error= $_FILES['vm']['error']; $file_loc = $_FILES['vm']['tmp_name']; $path = 'uploads/'; if(!empty($file)){ if(preg_match('/\.(mp4|webm|ogg|mp3|jpg)$/i',$file)){ if($error === 0){ if(move_uploaded_file($file_loc,$path.$file)){ echo 'uploading successfuly'; }else{ echo 'upload failed'; die(); } }else{ echo('error in file'); } } }else{ echo 'file can not be empty'; die(); } } ?> <form action="filehandler.php" method="post" enctype='multipart/form-data'> file<input type = 'file' name='vm' ><input type="submit" name="submit" value="submit"> </form>
  2. Hello i m trying to upload video files using AMPPS server with php 5.6 in it but when i uploads it gives me an error report in file that i uploading , and when i uploads an image file it upload with no error so i don't understand why it doesn't uploading videos/audios . please help if you have an clue in this thing
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.