Yii2.0 安装使用报错:yiiwebRequest::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攻击的
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。该设置位于config下的web.php,自己随便设置一段字符串就好了。例如
'cookieValidationKey' => 'asdfgh123456',

更多精彩