找不到类别“ dosamigos\ckeditor\CKEditor” [英] Class 'dosamigos\ckeditor\CKEditor' not found

查看:275
本文介绍了找不到类别“ dosamigos\ckeditor\CKEditor”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Yii2 中的一个项目上工作,我需要集成 CKEditor 。我用它来安装它:

I am working on a project in Yii2 where I need to integrate CKEditor. I used this to install it:

composer require 2amigos/yii2-ckeditor-widget

它将下载/ vendor目录下的库文件。当我将文件从本地复制到服务器并使用它时:

It downloads the library files under /vendor directory. When I copied the files from local to server and used this:

use dosamigos\ckeditor\CKEditor;

<?= $form->field($userSurveyConfig,
      'survey_email_body')->widget(CKEditor::className(),
      ['options' => ['rows' => 6],'preset' => 'basic'])
?>

运行页面时,会弹出此错误:

When I run the page, this error pops up:

> Class 'dosamigos\ckeditor\CKEditor' not found

我在这里做错了什么?有帮助吗?

What i am doing wrong here? Any help?

推荐答案

composer.json 文件复制到服务器并运行服务器上的编写器更新

Copy composer.json file to server and run composer update on server.

这篇关于找不到类别“ dosamigos\ckeditor\CKEditor”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆