use App\Business\UploadBusiness\UploadFile; / 上传方法 @param string $inputName 文件上传name @param null $relatively_path 文件存储相对路径,以public目录为根,不穿默认upload @param int $fileType 文件类型 @param null $save_name 文件存储名称,不传系统随机命名 @return array|bool 失落败返回false,成功返回文件信息 / public function upload($inputName, $relatively_path = null, $fileType = self::TYPE_IMAGE, $save_name = null)
富文本内容加码-将资源路径转为相对路径
use App\Business\UploadBusiness\UploadFile;UploadFile::contentEncode(ContainerInterface $container, $content);
利用从数据库中读取到富文本内容,然后将内容中的相对地址转为绝对地址。
富文本内容解码-将资源路径转为绝对路径
use App\Business\UploadBusiness\UploadFile;UploadFile::contentDecode(ContainerInterface $container, $content);
文档地址
上传业务(upload-business) - PHPZlc & Symfony
