js和php几种编码方法对特殊符号的编码对照表

来源:互联网 发布:bec背单词软件 编辑:程序博客网 时间:2024/05/22 11:35

参考:http://blog.sina.com.cn/s/blog_6797a6700100vt6r.html

 

符号

JavaScript(方法)

PHP(方法)

escape

encodeURI

encodeURI
Component

urlencode

rawurlencode

htmlentities

<space>

20%

20%

20%

+

20%

 

!

21%

!

!

21%

21%

!

@

@

@

40%

40%

40%

@

#

23%

#

23%

23%

23%

#

$

24%

$

24%

24%

24%

$

%

25%

25%

25%

25%

25%

%

^

^

^

^

^

^

^

&

26%

&

26%

26%

26%

&amp;

*

*

*

*

*

*

*

(

28%

28%

28%

29%

29%

29%

-

-

-

-

-

-

-

_

_

_

_

_

_

_

=

=

=

=

=

=

=

+

+

+

+

+

+

+

:

:

:

:

:

:

:

;

;

;

;

;

;

;

.

.

.

.

.

.

.

"

22%

22%

22%

22%

22%

&quot;

'

27%

'

'

27%

27%

'

\

\

\

\

\

\

\

/

/

/

/

/

/

/

?

?

?

?

?

?

?

<

</span>

</span>

</span>

</span>

</span>

&lt;

>

>

>

>

>

>

&gt;

~

~

~

~

~

~

~

[

[

[

[

[

[

[

]

]

]

]

]

]

]

{

{

{

{

{

{

{

}

}

}

}

}

}

}

`

60%

60%

60%

60%

60%

`

原创粉丝点击