So, when I'm, trying to upload, let's say video/avi with filesize of 100 MB the script returns this error:
Now, let's say I'm gonna upload the same file format (video/avi) but this time with filesize of 2 MB.. everything works fine.Notice: Undefined index: myfile in D:\xampp\htdocs\upload\upload.php on line 3
Notice: Undefined index: myfile in D:\xampp\htdocs\upload\upload.php on line 4
Notice: Undefined index: myfile in D:\xampp\htdocs\upload\upload.php on line 5
Notice: Undefined index: myfile in D:\xampp\htdocs\upload\upload.php on line 6
Notice: Undefined index: myfile in D:\xampp\htdocs\upload\upload.php on line 7
The same goes for images gif/jpeg and all that stuff what's uploaded instantly.
And when I try to upload 12MB .mov video, script will return aforementioned errors. I'm completely lost, because I don't know why it's working in this way... But it seems that errors display only if uploading process takes more than 2 seconds or so... (I'm pretty sure about it)... I noticed that (: Thank you!
upload.php script:
html form:<?php
$name = $_FILES["myfile"]["name"];
$type = $_FILES["myfile"]["type"];
$size = $_FILES["myfile"]["size"];
$tmp = $_FILES["myfile"]["tmp_name"];
$error = $_FILES["myfile"]["error"];
if ($error > 0)
{
die("Error uploading file.");
}
else
{
echo "File uploaded: $name<br>";
echo "Type: $type<br>";
echo "Size:".($size/1024)." Kb<br>";
}
?>
<html>
<form action='upload.php' method='post' enctype='multipart/form-data' >
<input type='file' name='myfile'> <br>
<input type='submit' name='upload' value='Upload'>
</form>
</html>