Method | Description | |
---|---|---|
__construct ( string $name, string $tmpName, string $type, integer $error, integer $size ) | Constructor. | |
getError ( ) : integer | Get upload error code. | |
getName ( ) : string | Get the original file name. | |
getSize ( ) : integer | Get the size of uploaded file, in bytes. | |
getTmpName ( ) : string | Get the location and name of the uploaded file on the server. | |
getType ( ) : string | Returns mime-type of the uploaded file. | |
store ( string $folder, null | string $filename = null ) : boolean | Store the uploaded file to a designated destination. |
public __construct ( string $name, string $tmpName, string $type, integer $error, integer $size ) | ||
$name | string | Original name of the uploaded file. |
$tmpName | string | Temp file name. |
$type | string | File mime-type. |
$error | integer | Error code, 0 if there is no error. |
$size | integer | Size of the file, in bytes. |
public getTmpName ( ) : string | ||
return | string | Temp location of the uploaded file on the server. |
public store ( string $folder, null | string $filename = null ) : boolean | ||
$folder | string | Folder under which the file will be saved. |
$filename | null | string | If you wish to store the file under a different name, other than the original uploaded name. |
return | boolean | True if file was successfully saved in the designated destination. |