Yii::app()->getBaseUrl(true) return 错误 URL
Yii::app()->getBaseUrl(true) return wrong URL
我在 link 中使用 Yii::app()->getBaseUrl(true) 获取服务器的根目录 URL。
但它 Return URL 喜欢
如果应用程序没有部署在服务器的根目录下
部署在服务器的根上
Yii::app()->getBaseUrl(true) return 路径是 http://applicationname/login
或
部署在服务器任意文件夹
Yii::app()->getBaseUrl(true) return 路径是 http://applicationname/applicationname/login
我在 link 中使用 Yii::app()->getBaseUrl(true) 获取服务器的根目录 URL。 但它 Return URL 喜欢
如果应用程序没有部署在服务器的根目录下
部署在服务器的根上
Yii::app()->getBaseUrl(true) return 路径是 http://applicationname/login
或
部署在服务器任意文件夹
Yii::app()->getBaseUrl(true) return 路径是 http://applicationname/applicationname/login