Class Upload
Methods summary
final public
boolean
|
#
__construct( array $attach, string $module = 'temp' )
初始化文件上传域
Parameters
- $attach
- $_FILES数组
- $module
- 模块名
Returns
boolean 初始化成功与否
|
public
type
|
#
getAttach( )
公共方法:获取attach数组
Returns
type
|
public
integer
|
|
public
boolean
|
|
protected
boolean
|
#
saveToLocal( type $source, type $target )
本地保存文件方法
Parameters
Returns
boolean
|
protected
boolean
|
#
checkDirType( string $module )
检查是否已存在模块目录
Parameters
Returns
boolean
|
protected
boolean
|
#
isUploadFile( string $source )
检查是否上传文件
Parameters
Returns
boolean
|
protected
boolean
|
#
isImageExt( string $ext )
检查是否图片格式后缀
Parameters
Returns
boolean
|
protected
string
|
#
getTargetDir( string $module )
获取目标文件夹,返回以 module/Ym/d/ 的目录形式
获取目标文件夹,返回以 module/Ym/d/ 的目录形式
Parameters
Returns
string
|
protected
存在与否
|
#
checkDirExists( string $module, string $ymDir, string $dayDir )
检查指定附件文件夹是否存在,适用于本地环境
Parameters
- $module
- 模块名
- $ymDir
- 月份文件夹
- $dayDir
- 日文件夹
Returns
存在与否
|
protected
string
|
|