yii2安装配置完成后,网页打开报错yiiwebRequest::cookieValidationKey must be configured with a secret key

下载了Yii2.0的basic版,配置好nginx之后,浏览器访问,出现如下错误:

Invalid Configuration – yiiaseInvalidConfigException

yiiwebRequest::cookieValidationKey must be configured with a secret key.

看了文档教程才发现自己犯了小白的错误,未配置cookieValidationKey。

该设置位于config下的web.php,自己随便设置一段字符串就好了。例如

'cookieValidationKey' => '123456',
原文地址:https://www.cnblogs.com/patrick-yeh/p/12931913.html