URL 变量中间的问号 [英] Question mark in the middle of a URL variable

查看:34
本文介绍了URL 变量中间的问号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个变量来传递一个 URL 并且它有一个问号,我是否只需要转义问号?

If I have a variable to pass through a URL and it has a question mark in it, do I just need to escape the question mark?

如果没有,我如何确保它按预期通过?

If not, how can I make sure it passes through like it's supposed to?

推荐答案

问号 URL 编码为 %3F.但是你应该对整个事情使用合适的编码器,而不是手动编码一个字符.

A question mark URL encodes as %3F. But you should use a proper encoder for the whole thing rather than manually encoding a character.

这篇关于URL 变量中间的问号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆