PHP5下,如何才能实现跳转后,在URL上添加参数?

dvdvip 2008-12-02 09:25:59
就像ASP.NET一样,用Response.Redirect跳转后,可以在网页后面添加参数,原来为abc.aspx的,现在变成abc.aspx?123456789

PHP5能实现这个功能吗?
...全文
354 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
海诗美妆 2008-12-03
  • 打赏
  • 举报
回复
GET的话可以随便添加。
    header('Location: http://www.example.com/example.php?需要添加的参数名=值');
knight0450 2008-12-03
  • 打赏
  • 举报
回复
恩,就是这样了
重写还没试过加参数
cyxin2121921 2008-12-03
  • 打赏
  • 举报
回复
mark
baisoft 2008-12-02
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 gingzai777 的回复:]
PHP codeheader('Location: http://www.example.com/example.php?123456789');
[/Quote]







da pp
oec2003 2008-12-02
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 gingzai777 的回复:]
PHP codeheader('Location: http://www.example.com/example.php?123456789');
[/Quote]

up
peace 2008-12-02
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 gingzai777 的回复:]
PHP codeheader('Location: http://www.example.com/example.php?123456789');
[/Quote]
up
iasky 2008-12-02
  • 打赏
  • 举报
回复
你写个随即数就可以了

使用header函数跳转,注意,header前不能有输出
jiang_jiajia10 2008-12-02
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 gingzai777 的回复:]
PHP codeheader('Location: http://www.example.com/example.php?123456789');
[/Quote]
UP
Zijian_Zhang 2008-12-02
  • 打赏
  • 举报
回复
header('Location: http://www.example.com/example.php?123456789');
Zijian_Zhang 2008-12-02
  • 打赏
  • 举报
回复
可以,用header跳转时写明URL就可以了
fxs_2008 2008-12-02
  • 打赏
  • 举报
回复
可以的,重写时加上就行了
header(的也可以加)

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧