#Yii Solution: Yii::app()->getBaseUrl() is returning empty string
@master_yii
Updated May 8, 2016 ● 5,529 views
Yii channell is about Yii PHP Framework. Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, dry design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product.
If you are a fellow Yii developer, join us! Do not hesitate to share your ideas. If you have a Yii product, you are welcome to share your creation here.
Check out Yii Framework official website.
While coding one of my projects, I encountered the need to get the base url of my website. Apparently, Yii::app()->getBaseUrl() is returning an empty string.
To resolve this issue, I just passed true as a parameter:
<?php echo Yii::app()->getBaseUrl(true);?>
Follow Yii Channel for more Yii PHP Framework tips!
#Yii Solution: Yii::app()->getBaseUrl() is returning empty string
Updated May 8, 2016 ● 5,529 views
Yii channell is about Yii PHP Framework. Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, dry design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product.
If you are a fellow Yii developer, join us! Do not hesitate to share your ideas. If you have a Yii product, you are welcome to share your creation here.
Check out Yii Framework official website.
While coding one of my projects, I encountered the need to get the base url of my website. Apparently, Yii::app()->getBaseUrl() is returning an empty string.
To resolve this issue, I just passed true as a parameter:
Follow Yii Channel for more Yii PHP Framework tips!