Answer the question
In order to leave comments, you need to log in
yii2 global variables?
I am working on a project on yii2 (video portal). It is planned to use 3 servers, 1 main and 2 for static (photo, video...). Question: how and in what place can I set a variable in yii2 responsible for the ip addresses of static servers? It would be nice to write the addresses in config/params.php, but how do you get the values from there?
Answer the question
In order to leave comments, you need to log in
> It would not be bad to write the addresses in config/params.php, but how then to get the values from there?Yii::$app->params[ '...' ];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question