I have 3 files, i.e., image1.jpg, movie1.mp4, and movie2.mp4 in my mobile phone.
And I have “uploadAction.php” for uploading the files which has the code below.
$loadingName = $_FILES['file']['name'] ;
$loadPath = 'myPath/' .$loadingName ;
move_uploaded_file($_FILES["file"]["tmp_name"], $loadPath) ;
When I try to upload image1.jpg, it is successfully uploaded.
When I try to upload movie1.mp4, it is successfully uploaded.
However,
When I try to upload movie2.mp4, it is not uploaded.
So I added the code below for seeing what is the problem.
echo $_FILES["file"]["type"] ;
After I added the code above in the page “uploadAction.php”, I try to upload the files image1.jpg, movie1.mp4, and movie2.mp4.
When I try to upload image1.jpg, it says “image/jpeg”.
When I try to upload movie1.mp4, it says “video/mp4”.
When I try to upload movie2.mp4, it says NOTHING.
Movie2.mp4 has no value for $_FILES[“file”][“type”] .
How can I make movie2.mp4 to upload successfully?