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)
错误原因是: