用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3688|回复: 4
收起左侧

url链接问题

[复制链接]
发表于 2008-3-20 09:11:42 | 显示全部楼层 |阅读模式
我有一个controller,叫course,然后我再在redirect('/course/published/' . $id, 'refresh');
 楼主| 发表于 2008-3-20 09:17:52 | 显示全部楼层

url链接问题

各位帮帮忙!
redirect('/course/edit/' . $id, 'refresh');我用了这这句,本来我的url是这样的:http://localhost/my/index.php/course/index/1
然后我提交到edit,地址就变成http://localhost/my/index.php/course/index.php/course/edit.
地址是往上加的,怎么回事??
发表于 2008-3-20 09:59:59 | 显示全部楼层
这样用试试:redirect('course/edit' . $id, 'refresh');

PS: 前后不要加斜杠。
 楼主| 发表于 2008-3-20 11:45:40 | 显示全部楼层
没有用啊,我试过了,
发表于 2008-3-20 11:59:06 | 显示全部楼层
那你设置 base_url 了吗??config.php 文件中。

本版积分规则