关于utf页面 字符串url编码转换为gbk有关问题

WBOY
Release: 2016-06-13 12:26:14
Original
1109 people have browsed it

关于utf页面 字符串url编码转换为gbk问题
比如我一个字符串为"天天",如何生成gbk  "%cc%ec%cc%ec" ,这是在这个页面生成的http://tool.chinaz.com/Tools/URLEncode.aspx
我页面为utf8,如何使用urlencode 生成GBK的编码呢?

------解决思路----------------------
echo urlencode(iconv('utf-8', 'gbk', $s));

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!