PHP Class org\upload\driver\Sae

Afficher le fichier Open project: top-think/thinkphp-extend

Méthodes publiques

Méthode Description
__construct ( mixed $config = null ) 构造函数,设置storage的domain, 如果有传配置,则domain为配置项,如果没有传domain为第一个路径的目录名称。
checkRootPath ( string $rootpath ) : boolean 检测上传根目录
checkSavePath ( string $savepath ) : boolean 检测上传目录
getError ( ) : string 获取最后一次上传错误信息
mkdir ( )
save ( array &$file, boolean $replace = true ) : boolean 保存指定文件

Method Details

__construct() public méthode

构造函数,设置storage的domain, 如果有传配置,则domain为配置项,如果没有传domain为第一个路径的目录名称。
public __construct ( mixed $config = null )
$config mixed 上传配置

checkRootPath() public méthode

检测上传根目录
public checkRootPath ( string $rootpath ) : boolean
$rootpath string 根目录
Résultat boolean true-检测通过,false-检测失败

checkSavePath() public méthode

检测上传目录
public checkSavePath ( string $savepath ) : boolean
$savepath string 上传目录
Résultat boolean 检测结果,true-通过,false-失败

getError() public méthode

获取最后一次上传错误信息
public getError ( ) : string
Résultat string 错误信息

mkdir() public méthode

public mkdir ( )

save() public méthode

保存指定文件
public save ( array &$file, boolean $replace = true ) : boolean
$file array 保存的文件信息
$replace boolean 同名文件是否覆盖
Résultat boolean 保存状态,true-成功,false-失败