将任意 url 作为 $_GET 变量传递
给定一些任意的 url:
view.php?viewid=blahblahblah
有没有一种方法可以对一个查询字符串进行编码,该查询字符串将上述 URL 作为变量并保留它的(view.php 的)查询字符串?
显然,对于某些 URL:
obvious.php?obvid=foobarzot&old_url=view.php?viewid=blahblahblah
根本不起作用,但是是否有一个 php 函数可以用来编码 view.php 以便我可以传递它?
干杯!
Given some arbitrary url:
view.php?viewid=blahblahblah
Is there a way I can encode a query string which has the above URL as a variable and preserves it's (view.php's) query string?
Obviously, for some URL:
obvious.php?obvid=foobarzot&old_url=view.php?viewid=blahblahblah
will not work at all, but is there a php function with which I could encode view.php so that I could pass it around?
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
urlencode
将 URL 添加到查询字符串之前。urlencode
the URL before adding it to the query string.我认为您正在寻找 urlencode()
I think you're looking for urlencode()