Home > Backend Development > PHP Tutorial > substr截取字符串之后,ajax传到前台之后为空

substr截取字符串之后,ajax传到前台之后为空

WBOY
Release: 2016-06-23 13:37:41
Original
1021 people have browsed it

substr截取字符串之后,ajax传到前台之后为空的,只有纯英文的可以显示,日文等要么整个为空的,请问这是哪方面的原因。


回复讨论(解决方案)

json返回的?中文必须要是utf-8的编码才能json输出

不截取时怎么样?

??是否UTF8?

以什么格式返回?编码对了没?

请保持文件编码格式是无BOM的UTF8,php默认编码是utf-8,mysql的编码也是utf-8,乱码问题会远离你!

还是先把代码贴出来看看吧

一般是编码问题造成的 转码试试

编码问题,统一用utf-8

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