php - Yii2 : Yii::$app->request->baseUrl not working in Linux -
its strange me, want base url in may main.php layout file. put code in main.php file.
<?php var_dump(yii::$app->request->baseurl); ?>
output:
string '/unfactory-v2/web' (length=17)
the same code when execute in linux system it's getting empty. like
string '' (length=0)
why not working linux??
i'm use yii 2.
in yii2 can use:
url::base()
or
url::home()
or
yii::$app->homeurl
even better, can use path aliases (http://www.yiiframework.com/wiki/667/yii-2-list-of-path-aliases-available-with-default-basic-and-advanced-app/)
Comments
Post a Comment