url decode problem 解决方法

编辑作者:www.789mux.com    在线用户:35    标签: html    sp   

在程序员开发程序的时候,都会遇到多种多样的问题,我们程序员也需要使用不同的后台开发不同的项目,本文是爱站技术频道小编带给大家的url decode problem 解决方法,一起来了解一下吧!
查了一下 RFC 3986: 有下面一段

Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-").
RFC 2396 有下面的一段

The plus "+", dollar "$", and comma "," characters have been added to those in the "reserved" set, since they are treated as reserved within the query component.
表示加号已经是url的保留字了,不需要转义。

然后html4文档里才有关于加号的转义:

application/x-www-form-urlencoded
Forms submitted with this content type must be encoded as follows:
Control names and values are escaped. Space characters are replaced by`+', and then reserved characters.....
声明只有content-type为application/x-www-form-urlencoded时才会对+做转义。

又翻了下php的文档,发现有一个

rawurlencode() - -encode according to RFC 3986
以上就是关于url decode problem 解决方法的介绍,相信上面的内容一定对你有着很大的帮助,文章由爱站技术频道为大家提供的,请好好收藏。

请发表您的评论