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 ...
随机推荐
- C# 世界坐标 页面坐标 PageUnit PageScale
PageScale: 获取或设置此 Graphics 的世界单位和页单位之间的比例.PageUnit: 获取或设置用于此 Graphics 中的页坐标的度量单位. 话不多说,上代码: privat ...
- 如何创建JUnit
这里拿Dynamic项目来演示,首先创建一个Dynamic项目,起名,点next, 继续点next, 将web.xml文件勾选,finish, 接下来在Java Resources->src下创 ...
- switch case 判断是否为按钮、设置属性 Load Foreach 绑定事件
private void button9_Click(object sender, EventArgs e) { foreach (Control CT in this.Controls) {//判断 ...
- C# 多态(2)
接上面讲 我们知道虚方法,和重写方法. 但是有没有发现 override和new的作用是差不多的. 但为什么还要单独写出来两个呢? 首先,咱们要明白一个问题,继承是具有线性传播的. class Fat ...
- 为什么要使用MQ消息中间件?
在面试大型互联网公司的时候,很可能会被问到消息队列的问题: 1.在何种场景下使用了消息中间件? 2.为什么要在系统里引入消息中间件? 3.如何实现幂等? 链式调用是我们在写程序时候的一般流程,为了完成 ...
- Charles设置可抓https的包
一.help 二.proxy
- python 面向对象十一 super函数
python 面向对象十一 super函数 super函数用来解决钻石继承. 一.python的继承以及调用父类成员 父类: class Base(object): def __init__(se ...
- [BZOJ2879][Noi2012]美食节(费用流)
题目描述 CZ市为了欢迎全国各地的同学,特地举办了一场盛大的美食节.作为一个喜欢尝鲜的美食客,小M自然不愿意错过这场盛宴.他很快就尝遍了美食节所有的美食.然而,尝鲜的欲望是难以满足的.尽管所有的菜品都 ...
- Python登陆人人网
#!coding:utf-8 import urllib2 import urllib import cookielib def renrenBrower(url,user,password): #登 ...
- 老男孩Day16作业:登录、注册、后台管理页面(动态)
一.作业需求: 1.后台管理主界面(左边菜单框.(全选.反选)框.返回顶部按钮) 2.老男孩登录.注册页面 二.博客地址:https://www.cnblogs.com/catepython/p/93 ...