
yii2 upload
php_zhaop
这个作者很懒,什么都没留下…
展开
-
yii2 upload(上传)
创建一个 models/UploadForm.php: <?php namespace app\models; use yii\base\Model; use yii\web\UploadedFile; /** * UploadForm is the model behind the upload form. */ class UploadForm extends Model {转载 2016-10-12 16:51:18 · 778 阅读 · 0 评论 -
对图片进行等比例缩小
/** * 上传文件 * @return string */ public function uploadFile() { if($this->checkError() && $this->checkSize() && $this->checkExt() && $this->checkMime() && $this->checkTrueImg() &&原创 2017-10-18 15:53:35 · 497 阅读 · 0 评论