参考:http://blog.sina.com.cn/s/blog_6797a6700100vt6r.html
符号 | JavaScript(方法) | PHP(方法) | ||||
escape | encodeURI | encodeURI | 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% | & |
* | * | * | * | * | * | * |
( | 28% | ( | ( | 28% | 28% | ( |
) | 29% | ) | ) | 29% | 29% | ) |
- | - | - | - | - | - | - |
_ | _ | _ | _ | _ | _ | _ |
= | = | = | = | = | = | = |
+ | + | + | + | + | + | + |
: | : | : | : | : | : | : |
; | ; | ; | ; | ; | ; | ; |
. | . | . | . | . | . | . |
" | 22% | 22% | 22% | 22% | 22% | " |
' | 27% | ' | ' | 27% | 27% | ' |
\ | \ | \ | \ | \ | \ | \ |
/ | / | / | / | / | / | / |
? | ? | ? | ? | ? | ? | ? |
< | </span> | </span> | </span> | </span> | </span> | < |
> | > | > | > | > | > | > |
~ | ~ | ~ | ~ | ~ | ~ | ~ |
[ | [ | [ | [ | [ | [ | [ |
] | ] | ] | ] | ] | ] | ] |
{ | { | { | { | { | { | { |
} | } | } | } | } | } | } |
` | 60% | 60% | 60% | 60% | 60% | ` |