PHP/HTML/ FILES — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 10:37, 26 мая 2010

$_FILE Elements

 
Element                         Contains                                Example
 
$ FILES["fupload"]["name"]      Name of uploaded file                   test.gif
 
$_FILES["fupload"]["tmp_name"]  Path to temporary file                  /tmp/asdfadsf
 
$_FILES["fupload"]["size"]      Size (in bytes) of uploaded file        6835
 
$_FILES["fupload"]["error"]     An error code corresponding to a PHP constant          UPLOAD_ERR_FORM_SIZE
 
$_FILES["fupload"]["type"]      MIME type of uploaded file (where given by client)    image/gif



Keys Created for a File When Uploaded

 
name         The name of the file as it was on the client machine
 
type         The MIME type for the file if known
 
size         The size of the uploaded file in bytes
 
tmp_name     The temporary name given to the file by PHP when it was uploaded to the server
 
error        An integer value representing the error that occurred while uploading the file