Home > Backend Development > PHP Tutorial > PHP输出的奇怪有关问题阿!求大神帮忙看看小弟我看了一天没看懂哪里来的奇怪字符

PHP输出的奇怪有关问题阿!求大神帮忙看看小弟我看了一天没看懂哪里来的奇怪字符

WBOY
Release: 2016-06-13 12:08:44
Original
849 people have browsed it

PHP输出的奇怪问题阿!!!求大神帮忙看看我看了一天没看懂哪里来的奇怪字符
首先我刚开始学php  写了个从数据库读完后 输出JSON的过程

看上去结果是对的阿~~~ 然后我去某效验网站   提示我 
于是我找了半天原因发现不知道哪里来的阿  在字符串前面有4个莫名其妙的东西。。。

请问这个是哪里来的阿 = = 我要怎么弄掉。。。
function index()
{
$cc=new DemoDao();
$resu=$cc->index();
$json=json_encode($resu);
$json=urldecode($json);
$total=24;
$json="{".'"total"'.":$total,".'"rows"'.":".$json."}";
echo $json;
}
最后输出Json的

急求大神 帮我看看~!!!!!!!!!!!!   编码都是utf-8
------解决思路----------------------
显然是bom头

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