zifeiyu

zifeiyu

不论妄境如何,真心不随妄境而走,该怎么办就怎么办,是什么人就做什么人。

  • 财富值7570
  • 威望值50
  • 总积分8580

个人信息

  • 求解,在本地的环境中使用UEditor是好的,可是上传到服务器上却显示,找不到UEditor类

    _form.php中的代码

    
    use kucha\ueditor\UEditor;
    
    <?= UEditor::widget([
                'model' => $model,
                'attribute' => 'text',
        ]) ?>
    

    在服务器上提示

     PHP Fatal Error – yii\base\ErrorException
    Class 'kucha\ueditor\UEditor' not found
    

    本地环境 系统-mac 环境-xampp

    服务器上的UEditor包,我是在本地下好后,用ftp上传到vendor中的

  • 回复了 的评论

    上传图片提示上传错误

    controller中的imagePathFormat是在那个文件夹下,是要在web文件夹下建立/upload/image/这两个文件夹吗?

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

    已解决,原来backend/web/中有一个upload的文件夹,他没有写入权限,所以上传错误

  • 赞了扩展
    Yii2-ueditor-widget
  • 上传图片提示上传错误

    controller中的imagePathFormat是在那个文件夹下,是要在web文件夹下建立/upload/image/这两个文件夹吗?

    public function actions()
        {
            return [
                'upload' => [
                    'class' => 'kucha\ueditor\UEditorAction',
                    'config' => [
                        "imageUrlPrefix"  => "http://www.baidu.com",//图片访问路径前缀
                        "imagePathFormat" => "/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}" //上传保存路径
                    ],
                ]
            ];
        }
    
副总裁 等级规则
8580/10000
资料完整度
80/100
用户活跃度
10/100

Ta的关注

1

Ta的粉丝

11

Ta的访客

28