http://php.net/manual/en/features.file-upload.php
$_FILES['userfile']['name']
- The original name of the file on the client machine.$_FILES['userfile']['type']
- The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.$_FILES['userfile']['size']
- The size, in bytes, of the uploaded file.$_FILES['userfile']['tmp_name']
- The temporary filename of the file in which the uploaded file was stored on the server.$_FILES['userfile']['error']
- The error code associated with this file upload.
Array(
[userfile] => Array
(
[name] => Untitled.png
[type] => image/png
[tmp_name] => /tmp/phpekB8SR
[error] => 0
[size] => 142225
)
)
http://php.net/manual/ru/features.file-upload.errors.php
http://php.net/manual/en/features.file-upload.common-pitfalls.php
http://php.net/manual/en/features.file-upload.multiple.php
(
[userfile] => Array
(
[name] => Array
(
[0] => Untitled.pdf
)
[type] => Array
(
[0] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpq3DzyD
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 701817
)
)
[file] => Array
(
[name] => Array
(
[0] => screenshot_173002.png
)
[type] => Array
(
[0] => image/png
)
[tmp_name] => Array
(
[0] => /tmp/phpOubWrB
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 330697
)
)
)
or
(
[userfile] => Array
(
[name] => Array
(
[0] => ЄП_ЧАстина_2.pdf
[1] => Untitled 1.odt
)
[type] => Array
(
[0] => application/pdf
[1] => application/vnd.oasis.opendocument.text
)
[tmp_name] => Array
(
[0] => /tmp/phpcAOLWj
[1] => /tmp/phpdy1JWR
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 116611
[1] => 9489
)
)
)
http://php.net/manual/en/features.file-upload.put-method.php