\" character in my url? will this cause any problem? 开发者_C百科cats.php?cat=26&parent=24&position=24>26>" />
开发者

Can i use ">" character in url

I am going to use ">" character in my url? will this cause any problem?

开发者_C百科cats.php?cat=26&parent=24&position=24>26>


You can do it, and it probably won't cause any problems.
But to be on the safe side you should take a look at http://php.net/manual/en/function.urlencode.php


It isn't a URL safe character, so it should be URL encoded: %3E


Encode it rather than including it directly:

cats.php?cat=26&number=26%3E24


According to RFC 3986 2. Characters, only letters and digits from the US-ASCII character set and the symbols %:/?#[]@!$&'()*+,;=-._~ are allowed in URLs.

You have to %-encode ">".


Just escape it

>>> escape(">")
"%3E"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜