传球&在url变量中 [英] passing & in url variable
本文介绍了传球&在url变量中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在url中传递一个像alias ='''F& B''这样的变量。但是当我尝试使用$ _GET获取下一页的价值时,它会破碎。
url like
展开 | 选择 | Wrap | 行号
解决方案
_GET,它的破灭。
url like
展开 | 选择 | Wrap | 行号
嘿。
& character在URL的查询字符串中具有特殊含义。在添加之前,您需要 urlencode()。
如果您不能通过PHP执行此操作,则"&" 的URL编码替换为"%26" 。
我已经完成了。我使用ralurlencode
和网址看起来像
展开 | 选择 | Wrap | 行号
hi,
I need to pass a variable like alias=''F&B'' in url. but when i try to get the value in next page using $_GET ,its breaking.
url like
Expand|Select|Wrap|Line Numbers解决方案_GET ,its breaking.
url like
Expand|Select|Wrap|Line Numbers
Hey.
The & character has special meaning in the query string of an URL. You need to urlencode() it before adding it.
If you can''t do it via PHP, the URL encoded replacement for "&" is "%26".
i have done that.i use ralurlencode
and the url looks like
Expand|Select|Wrap|Line Numbers
这篇关于传球&在url变量中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆