谁一开始就是大神?

ueditor上传图片为什么只显示文件名字呢?[2.0]

2017-06-06_105243.png

在controller里actions配置imageRoot就只显示名字,不设置就显示图片

  return [
            'upload' => [
                'class' => 'kucha\ueditor\UEditorAction',
                'config' => [
                    //"imageUrlPrefix"  => "http://www.baidu.com",//图片访问路径前缀
                    "imagePathFormat" => "/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}" ,//上传保存路径
                     "imageRoot" => Yii::getAlias("@image"),

            ],
        ]

打开你的控制台,看看服务器返回的状态值

赞(0) 打赏
未经允许不得转载:菜鸟之家 » ueditor上传图片为什么只显示文件名字呢?[2.0]

评论 抢沙发

登录

找回密码

注册