Home > Backend Development > PHP Tutorial > 关于两页面编码不一样,该如何处理

关于两页面编码不一样,该如何处理

WBOY
Release: 2016-06-13 12:26:01
Original
744 people have browsed it

关于两页面编码不一样

本帖最后由 u013366173 于 2015-10-19 21:47:39 编辑 本人的网站是UF8编码,现在想做个短信接口,那边接口是gbk编码   (用GET方式网址传参到短信接口页面)

那么我 这边uf8页面如何写法 才能把中文信息正确传到短信的gbk页面呢
------解决思路----------------------
在发送json时
header('Content-Type:text/json;charset=gbk');
Copy after login
试试
------解决思路----------------------
传递的数据中有中文吗?如有请先转成 gbk 的
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