Quote:
Originally Posted by HelloWorld I don't think it would check what's within the file right? *I'm talking about $_FILES['file', 'error']* |
Well if you look at your code, the lines that include code such as:
PHP Code:
$_FILES["file"]["name"]
$_FILES["file"]["type"]
$_FILES["file"]["size"]
Are all to do with checking the actual file, it checks its name, type and size, then you have the code:
PHP Code:
$_FILES["file"]["error"]
So this means its checking the file for an error, to break it down:
PHP Code:
$_FILES["file"]
refers to the file and then its followed by something else, as you can see above its either looking for the name, type, size and also its looking for any errors.
Just a little scenario, lets say your uploading a picture and your Internet crashes meaning the picture is not uploaded fully, the file would then contain errors, the php code will therefore not show statistics on file like the name and size but will handle the file in its own way.
hope that helps you see why it is checking the file for errors and not the php code.