Exception 'ReflectionException' with message 'Class require does not exist'
记录一下今天遇到的错误
在使用
<?= $form->field($model, 'content')->textarea() ?>
的时候报错
Exception 'ReflectionException' with message 'Class require does not exist'
in D:\phpStudy\WWW\vvv\vendor\yiisoft\yii2\di\Container.php:415
Stack trace:
#0 D:\phpStudy\WWW\clecssv2\vendor\yiisoft\yii2\di\Container.php(415): ReflectionClass->__construct('require')
#1 D:\phpStudy\WWW\clecssv2\vendor\yiisoft\yii2\di\Container.php(358): yii\di\Container->getDependencies('require')
#2 D:\phpStudy\WWW\clecssv2\vendor\yiisoft\yii2\di\Container.php(151): yii\di\Container->build('require', Array, Array)
#3 D:\phpStudy\WWW\clecssv2\vendor\yiisoft\yii2\BaseYii.php(344): yii\di\Container->get('require', Array, Array)
#4 D:\phpStudy\WWW\clecssv2\vendor\yiisoft\yii2\validators\Validator.php(206): yii\BaseYii::createObject(Array)
错误原因是:
public function rules()
{
return [
[['content'],'require'],
];
}
少了一个d, required
Exception 'ReflectionException' with message 'Class require does not exist'的更多相关文章
- php 导出 Excel 报错 exception 'PHPExcel_Calculation_Exception' with message
exception 'PHPExcel_Calculation_Exception' with message '粉丝数据!C2679 -> Formula Error: Operator '= ...
- exception 'DOMException' with message 'Invalid Character Error' Php + Mongodb
问题描述: 项目属于MVC设计模式,技术和框架采用了php5.6 + Yii2.0 + MongoDB. 在我从Controller中调用Model 的 findAll([]) 方法获取数据打印到屏幕 ...
- windows redis:Uncaught exception 'RedisException' with message 'Redis server went away'
window-exe-redis-2.8.12服务,当你复制好php_igbinary.dll,php_redis.dll时候,你运行redis报错:Fatal error: Uncaught exc ...
- Could not create pool connection. The DBMS driver exception was: null, message from server: "Host '192.168.XX.XX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
早上打开浏览器准备登陆某个系统,发现Error 404--Not Found,有点奇怪,这个服务器应该没人用了才对,然后到weblogic后台去看日志,报如下错误: "Could not c ...
- UBUNTU下MONGODB出现PHP Fatal error: Uncaught exception 'MongoConnectionException' with message 和 Authentication failed on database 'admin' with username
MONGO 远程连接服务器,出现: PHP Fatal error: Uncaught exception Stack trace:# /var/www/data/update_data.php(): ...
- php错误:Uncaught exception com_exception with message Failed to create COM object
本文为大家讲解的是php错误:Uncaught exception com_exception with message Failed to create COM object,感兴趣的同学参考下. ...
- Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory解决方法
今天用pdo连接mysql遇到一个奇怪的问题,host设为127.0.0.1可以连接成功,设为localhost就会报如下的错误: PHP Fatal error: Uncaught excepti ...
- DVWA--登录页面错误问题 469 | | PHP Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:\web\DVWA\dvwa\includes\dvwaPage.inc.php:469
// MySQL PDO Prepared Statements (for impossible levels) $db = new PDO('mysql:host=' . $_DVWA[ 'db_s ...
- Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory'
1.根本原因在http://askubuntu.com/questions/606732/php-fatal-error-uncaught-exception-pdoexception-with-me ...
随机推荐
- QT开发环境
代码实现界面和槽 代码实现界面和槽 在上述工程的dialog.h中添加如下加黑代码: 加入头文件: #include <QLabel> #include <QLineEdit> ...
- Alpha冲刺(二)
Information: 队名:彳艮彳亍团队 组长博客:戳我进入 作业博客:班级博客本次作业的链接 Details: 组员1(组长)柯奇豪 过去两天完成了哪些任务 学习并配置了ssm框架(用于前后端交 ...
- Python - selenium_WebDriver 鼠标键盘事件
from selenium import webdriver #引入ActionChains类 提供了鼠标的操作方法 from selenium.webdriver.common.action_cha ...
- XE中FMX操作ListBox,添加上千条记录(含图片)
我之前是想在ListBox的每个Item上添加一个图片,Item上所有的内容都是放在Object里赋值,结果发现加载一百条记录耗时四五秒: procedure TMainForm.AddItem; v ...
- jQuery bind() live()
<script type="text/javascript"> $(document).ready(function () { /*$('.clickme').live ...
- Android 应用检查更新并下载
1.在Android应用当中都有应用检查更新的要求,往往都是在打开应用的时候去更新下载. 实现的方法是:服务器端提供接口,接口中可以包含在最新APK下载的URL,最新APK的VersionCode,等 ...
- 所谓IIS未注册引起的故障及解决
- 新建项目下的web文件夹下的dynamic web project和static web project和web fragment project的区别
dynamic web project是Eclipse的项目,与其对应的有static web project,前者指动态web项目,包含一些动态代码,如java:而static web projec ...
- 【leetcode 144. 二叉树的前序遍历】解题报告
前往二叉树的:前序,中序,后序 遍历算法 方法一:递归 vector<int> res; vector<int> preorderTraversal(TreeNode* roo ...
- audio音频
html5的audio功能上已经非常强大,回放,跳转,缓冲等以前只能用flash才能实现的功能,html5的audio都能轻松搞定 最近的一个项目使用到了这个功能,把我使用的情况写下来,供大家参考, ...