PHP/HTML/ FILES

Материал из Web эксперт
Версия от 07:05, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

$_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