When I do
print_r(Yii::app()->request->baseUrl)
I get an empty string. A post on the Yii forum says this is blank by default. How can I c
try echo Yii::$app->baseUrl(true) Note that the true parameter is what does the needful.
echo Yii::$app->baseUrl(true)