V
V
vadim_tur2016-01-22 10:46:57
Yii
vadim_tur, 2016-01-22 10:46:57

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

1 answer(s)
V
Vitaly Khomenko, 2016-01-22
@vadim_tur

> 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 question

Ask a Question

731 491 924 answers to any question