thinkphp5は、テキストエディタのueditor画像アップロードのパスにURLを追加します
アップロード画像のカテゴリを見つける
thinkphpwu \ public \ static \ hadmin \ lib \ ueditor \ 1.4.3 \ phpのUploader.class.phpクラスでgetFileInfo
メソッドを見つけます
/**
* 获取当前上传成功文件的各项信息
* @return array
*/
public function getFileInfo()
{
return array(
"state" => $this->stateInfo,
"url" => $this->fullName,
"title" => $this->fileName,
"original" => $this->oriName,
"type" => $this->fileType,
"size" => $this->fileSize
);
}
コントローラ定義のドメイン名を変更します
define('DOMAIN','http://app.thinkphpwu.com');
getFileInfoメソッドを変更します
参加する
「url」=> DOMAIN。$ this-> fullName、
/**
* 获取当前上传成功文件的各项信息
* @return array
*/
public function getFileInfo()
{
return array(
"state" => $this->stateInfo,
"url" => DOMAIN.$this->fullName,
"title" => $this->fileName,
"original" => $this->oriName,
"type" => $this->fileType,
"size" => $this->fileSize
);
}
検証
<p>
<img src="http://app.thinkphpwu.com/ueditor/php/upload/image/20210109/1610186390184928.png" title="1610186390184928.png" alt="company_notice.png"/>
</p>