zifeiyu
- zifeiyu 评论了扩展 Yii2-ueditor-widget
求解,在本地的环境中使用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的文件夹,他没有写入权限,所以上传错误
- zifeiyu 评论了扩展 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}" //上传保存路径 ], ] ]; }