zhangcjl 发表于 2010-5-2 01:26:37

【HELP】请问超链接怎么写???

本帖最后由 zhangcjl 于 2010-5-2 09:47 编辑

RT。。。。。。。
我在 http://localhost/codeigniter/index.php/welcome/index
http://localhost/codeigniter/index.php/welcome
http://localhost/codeigniter/index.php
http://localhost/codeigniter/
这几个链接页面有 echo "<a href='index.php/login/logout'>退出登陆</a>";这个链接

在http://localhost/codeigniter/index.php/welcome/index
http://localhost/codeigniter/index.php/welcome
http://localhost/codeigniter/index.php
http://localhost/codeigniter/
这几个链接下面,
只有 http://localhost/codeigniter/index.php
http://localhost/codeigniter/
这两个链接能正确跳转到控制器login,另外两个都有错误不能正确跳转,我不想把链接写成
<a href='http://localhost/codeigniter/index.php/login/logout'>退出登陆</a>

HELP,各位大侠帮帮小弟~~呵呵~~这里先谢谢了~~~

jeongee 发表于 2010-5-2 10:13:11

好好看手册哦,使用url辅助函数

Hex 发表于 2010-5-2 19:16:16

site_url()

zhangcjl 发表于 2010-5-2 22:00:30

回复 2# ywqbestever


   echo "<a href='index.php/login/logout'>退出登陆</a>";
这里我本来也想用site_url的,但是好像直接输出site_url()。。。。。。

zhangcjl 发表于 2010-5-2 22:02:26

回复 3# Hex


    早上在群里,有人教我用<base>
我用<base href="<?=site_url('index.php/')?>"/>
就搞定了~~呵呵~~
谢谢~~

zhangcjl 发表于 2010-5-2 22:02:55

回复 2# ywqbestever


    谢谢~~
页: [1]
查看完整版本: 【HELP】请问超链接怎么写???