记录一下今天遇到的错误

在使用

<?= $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'的更多相关文章

  1. php 导出 Excel 报错 exception 'PHPExcel_Calculation_Exception' with message

    exception 'PHPExcel_Calculation_Exception' with message '粉丝数据!C2679 -> Formula Error: Operator '= ...

  2. exception 'DOMException' with message 'Invalid Character Error' Php + Mongodb

    问题描述: 项目属于MVC设计模式,技术和框架采用了php5.6 + Yii2.0 + MongoDB. 在我从Controller中调用Model 的 findAll([]) 方法获取数据打印到屏幕 ...

  3. 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 ...

  4. 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 ...

  5. 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(): ...

  6. php错误:Uncaught exception com_exception with message Failed to create COM object

    本文为大家讲解的是php错误:Uncaught exception com_exception with message Failed to create COM object,感兴趣的同学参考下. ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. Oracle sql语句执行顺序(转)

    from: http://blog.csdn.net/lailai186/article/details/12612263 sql语法的分析是从右到左 一.sql语句的执行步骤:1)语法分析,分析语句 ...

  2. (十)ASP.NET自定义用户控件(3)

    using HX.DHL.EIP.Services.Def.Localization; using HX.DHL.EIP.Web.Framework; using System; using Syst ...

  3. c#缓存介绍

    #缓存介绍(转) 本章导读 缓存主要是为了提高数据的读取速度.因为服务器和应用客户端之间存在着流量的瓶颈,所以读取大容量数据时,使用缓存来直接为客户端服务,可以减少客户端与服务器端的数据交互,从而大大 ...

  4. js任意位数求和

    <script> //任意位数求和 function sum(){ if(arguments.length==1) { console.log(arguments[0]) return; ...

  5. [.net 多线程]CountdownEvent

    System.Threading.CountdownEvent 是一个同步基元,它在收到一定次数的信号之后,将会解除对其等待线程的锁定.CountdownEvent在初始化时有一个初始计数量,在每个工 ...

  6. C#设计模式系列:适配器模式(Adapter Pattern)

    一.引言 在软件系统中,由于应用环境的变化,常常需要将“一些现存的对象”放在新的环境中应用.但是新环境要求的接口是这些现存对象所不满足的.如何应对这种“迁移的变化”?如何既能利用现有对象的良好实现,同 ...

  7. 怎样检查fragmentation

    可以运行下面SQL语句: SELECT dbschemas.[name] AS 'Schema', dbtables.[name] AS 'Table', dbindexes.[name] AS 'I ...

  8. OpenResty 最佳实践 (2)

    此文已由作者汤晓静授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. lua 协程与 nginx 事件机制结合 文章前部分用大量篇幅阐述了 lua 和 nginx 的相关知识,包 ...

  9. 远程连接linux服务上的mysql

    如果有童鞋linux上还未安装mysql数据库可以参考我上一篇博客 (1)首先确保 linux服务上的 mysql 的3306端口是对外开放的 编辑 vi /etc/sysconfig/iptable ...

  10. 《javascript 高级程序设计》 笔记1 1~7章

    chapter 2 在html中使用JavaScript chapter 3 基本概念 EMCAscript 语法 变量,函数名和操作符都区分大小写. 使用var定义的变量将成为定义该变量的作用域中的 ...