Yii2.0 安装使用报错:yii\web\Request::cookieValidationKey must be configured with a secret key.
下载了Yii2.0的basic版,配置好apache之后,浏览器访问,出现如下错误:
Invalid Configuration – yii\base\InvalidConfigException yii\web\Request::cookieValidationKey must be configured with a secret key.
这是因为未配置cookieValidationKey,这个配置项主要是为了防止cookie攻击的
该设置位于config下的web.php,自己随便设置一段字符串就好了。例如
'cookieValidationKey' => 'asdfgh123456',