CodeIgniter 中国开发者社区诚征热爱 CI 的版主

查看完整版本: 参数传递问题

orange 2008-9-4 09:08

参数传递问题

email地址作为参数通过浏览器地址栏进行传递
[url]http://127.0.0.1/index.php/rule/index/0001/test@sainet.com[/url]
0001和[email]test@sainet.com[/email]为参数,提示我下面的内容
The URI you submitted has disallowed characters: [email]test@sainet.com[/email]
不允许特殊字符作为参数传递么?那我该怎么办?

lixinxin_ci 2008-9-4 09:30

session呗

[email]test@sainet.com[/email]
1.
使用session传递,用完后注销,可以节约服务器资源
2.
使用test?sainet.com , 把“? ”改为可用的字符,然后把传递过来的值转换一下
[email]test@sainet.com[/email]例子我就不写了
3.
[url]http://127.0.0.1/index.php/rule/index/0001/test@sainet.com[/url]
换成[url]http://127.0.0.1/index.php/rule/index/0001/test/sainet.com[/url]

orange 2008-9-4 09:51

好,谢谢了。我去试试

Hex 2008-9-4 23:21

呵呵,修改 config.php 文件,允许 @ 不就可以了吗!
页: [1]
查看完整版本: 参数传递问题