文件上传类¶
| 属性 | 值 |
|---|---|
| 命名空间 | fize\io |
| 类名 | Upload |
| 方法: |
|---|
| 方法名 | 说明 |
|---|---|
| __construct() | 初始化 |
| error() | 错误信息 |
| path() | 文件路径 |
| save() | 保存文件 |
| config() | 单例配置 |
| single() | 简易模式下的单文件上传 |
| multiple() | 简易模式下的多文件上传 |
方法¶
__construct()¶
初始化
public function __construct (
mixed $file,
array $config = []
)
| 参数: |
|
|---|
single()¶
简易模式下的单文件上传
public static function single (
mixed $file,
array $config = []
) : array
| 参数: |
|
||||||
|---|---|---|---|---|---|---|---|
| 返回值: | [file, path, error] |
multiple()¶
简易模式下的多文件上传
public static function multiple (
mixed $files,
array $config = []
) : array
| 参数: |
|
|---|