Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
删除CodeIgniter站点中一个链接的基本url_Codeigniter_Hyperlink - Fatal编程技术网

删除CodeIgniter站点中一个链接的基本url

删除CodeIgniter站点中一个链接的基本url,codeigniter,hyperlink,Codeigniter,Hyperlink,代码点火器问题。我想向我的一个CI站点添加一个外部链接,因此我不想包含基本URL。无论我做什么,我总是得到这样的东西:http://www.ourwayproj.net/index.php/www.yahoo.com。当我想要的只是这个:http://www.yahoo.com。如何从要添加的链接中删除基本url 下面是我想使用的标签:评论中的漂亮答案 对于外部链接,需要在地址前面加上协议,例如http:// <a target = "_blank" href = <?="http:

代码点火器问题。我想向我的一个CI站点添加一个外部链接,因此我不想包含基本URL。无论我做什么,我总是得到这样的东西:
http://www.ourwayproj.net/index.php/www.yahoo.com
。当我想要的只是这个:
http://www.yahoo.com
。如何从要添加的链接中删除基本url

下面是我想使用的标签:
评论中的漂亮答案

对于外部链接,需要在地址前面加上协议,例如http://

<a target = "_blank" href = <?="http://".$account->getUrl().".webbiz.biz";?>

从评论中得到的漂亮答案

对于外部链接,需要在地址前面加上协议,例如http://

<a target = "_blank" href = <?="http://".$account->getUrl().".webbiz.biz";?>

我在我的项目中这样做,并使用:

<a href="<?php echo 'http://' . $row->ip_address; ?>" target="_blank">Show</a>

我在我的项目中做到了这一点,并使用:

<a href="<?php echo 'http://' . $row->ip_address; ?>" target="_blank">Show</a>

只要$account->getUrl()是一个绝对地址(以http://开头),它就可以工作。不,“$account->getUrl()”函数只会给我URL的ip地址,即URL的“yahoo”部分链接需要它前面的协议-http://Got -多谢各位。对于那些在这里遇到相同问题的人来说,url应该是什么样子的:只要$account->getUrl()是一个绝对地址(以http:///开头),它就应该工作不,“$account->getUrl()”函数只会给我url的ip ie:“yahoo”部分链接需要它前面的协议-http://Got -多谢各位。对于那些遇到相同问题的人,以下是url的外观: