yii2 used in the custom configuration file params.php

yii2 using the configuration file is in params, you can use Yii::$app->params['key1']the form of access

reference

  1. yii can't access Yii::$app->params ( return null value) in yii2

Guess you like

Origin www.cnblogs.com/fsong/p/11259959.html
Recommended