【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,各位大侠帮帮小弟~~呵呵~~这里先谢谢了~~~ 好好看手册哦,使用url辅助函数 site_url() 回复 2# ywqbestever
echo "<a href='index.php/login/logout'>退出登陆</a>";
这里我本来也想用site_url的,但是好像直接输出site_url()。。。。。。 回复 3# Hex
早上在群里,有人教我用<base>
我用<base href="<?=site_url('index.php/')?>"/>
就搞定了~~呵呵~~
谢谢~~ 回复 2# ywqbestever
谢谢~~
页:
[1]