如何用yii获取当前网址和域名?
- 内容介绍
- 文章标签
- 相关推荐
本文共计637个文字,预计阅读时间需要3分钟。
假设我们要将以下内容进行简化改写,不超过100字,不使用数字:
原文:假设计算当前页面的访问地址是:http://localhost/CMS/public/index.php?r=newsid=1(推荐教程:yii)(一、获取当前域名:echo Yii::app()->request->hostInfo; 结果:http://localhost)
简化版:获取当前访问地址:http://localhost/CMS/public/index.php?r=newsid=1。显示域名:http://localhost。
本文共计637个文字,预计阅读时间需要3分钟。
假设我们要将以下内容进行简化改写,不超过100字,不使用数字:
原文:假设计算当前页面的访问地址是:http://localhost/CMS/public/index.php?r=newsid=1(推荐教程:yii)(一、获取当前域名:echo Yii::app()->request->hostInfo; 结果:http://localhost)
简化版:获取当前访问地址:http://localhost/CMS/public/index.php?r=newsid=1。显示域名:http://localhost。

