$_FILES | |
Type | keyword |
Dictionary | LCS |
Library | LiveCode Script |
Syntax |
|
Summary | $_FILES is an array variable that is used to handle file uploads. |
Introduced | 4.6.4 |
OS | mac, windows, linux |
Platforms | server |
Example |
|
Related | Keyword: $_GET_BINARY, $_SERVER, $_POST, $_POST_BINARY, $_GET, $_POST_RAW, $_GET_RAW |
Description | Use the $_FILES keyword to access the array generated from uploading a file. $_FILES is only available when running in CGI mode (Server). The $_FILES is array is used to store information about files that have been uploaded. The contents of $_FILES is as follows. The upload name 'userfile' is for demonstration purposes in this example and can be changed as required:$_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. $_FILES['userfile']['size'] // The size, in bytes, of the uploaded file. $_FILES['userfile']['filename'] // The temporary filename of the file in which the uploaded file was stored on the server. $_FILES['userfile']['error'] // Any error string associated with this file upload. The following error messages can be returned in the event of a file upload error: "uplaod stopped" - The uploaded file was only partially uploaded. "upload failed" - No file was uploaded.
The server engine copies the contents of the files into a temporary location. Once the script has finished executing, all temporary files that were created are deleted. |