Class Uploader
Class Uploader
Namespace: Slimore\Upload
Package: Slimore\Upload
Author: Pandao
Located at Slimore/Upload/Uploader.php
Package: Slimore\Upload
Author: Pandao
Located at Slimore/Upload/Uploader.php
Methods summary
public
viod
|
|
public
|
|
public
boolean
|
|
public
string
|
|
public
string
|
|
public
|
|
public
array|string
|
|
public
|
|
public
array|string
|
|
public
array|string
|
|
public
|
Properties summary
public
array
|
$files
$_FILES array |
|
public
integer
|
$mode
Read and write authority mode |
#
0755
|
public
string
|
$lang
|
#
'EN'
|
public
string
|
$fileExit
Filename extension |
|
public
string
|
$saveName
Saved filename |
|
public
string
|
$saveURL
Url path Saved to database |
|
public
string
|
$savePath
Saved the local file path |
|
public
string
|
$message
Output result message |
|
public
string|integer
|
$randomLength
Generate the length of the random file name |
#
'Ymd'
|
public
integer
|
$randomNameType
Generate the random form |
#
1
|
public
string
|
$timezone
Timezone |
#
'PRC'
|
public
array
|
$formats
Allow Upload file format |
#
['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp']
|
public
integer
|
$maxSize
Maximum upload file size, unit KB |
#
1024
|
public
boolean
|
$cover
Whether to cover the same name file, true covered, false not covered |
#
true
|
public
boolean
|
$redirect
Whether URL redirect |
#
false
|
public
string
|
$redirectURL
Redirect url |
#
""
|
public
array
|
$errors
Errors message |
#
[
'empty' => 'The upload file can\'t be empty.',
'format' => 'The uploaded file format does not conform to the regulations.',
'maxsize' => 'The upload file size too large.',
'unwritable' => 'Save the directory not to write, please change permissions.',
'not_exist' => 'Save the directory not exist.',
'same_file' => 'There are already the same file exist.'
]
|