PHP
将用户昵称已urlencode的方式加密存入数据库
urlencode("中文-_. ")."\n"; //%D6%D0%CE%C4-_.+ //将中文文字转换成urlencode文字编码
js
通过decodeURI() 函数可对 encodeURI() 函数编码过的 URI 进行解码。
decodeURI("%D6%D0%CE%C4-_. ")."\n"; //中文-_.
PHP
将用户昵称已urlencode的方式加密存入数据库
urlencode("中文-_. ")."\n"; //%D6%D0%CE%C4-_.+ //将中文文字转换成urlencode文字编码
js
通过decodeURI() 函数可对 encodeURI() 函数编码过的 URI 进行解码。
decodeURI("%D6%D0%CE%C4-_. ")."\n"; //中文-_.