public function Uploader::__construct in UEditor - 百度编辑器 7.3
Same name and namespace in other branches
- 7.2 includes/Uploader.class.inc \Uploader::__construct()
构造函数
Parameters
string $fileField 表单名称:
array $config 配置项:
bool $base64 是否解析base64编码,可省略。若开启,则$fileField代表的是base64编码的字符串表单名:
File
- includes/
Uploader.class.inc, line 54
Class
- Uploader
- Created by JetBrains PhpStorm. User: taoqili Date: 12-7-18 Time: 上午11: 32 UEditor编辑器通用上传类
Code
public function __construct($fileField, $config, $type = "upload") {
$this->fileField = $fileField;
$this->config = $config;
$this->type = $type;
if ($type == "remote") {
$this
->saveRemote();
}
else {
if ($type == "base64") {
$this
->upBase64();
}
else {
$this
->upFile();
}
}
}