I'm using codeigniter, my program is fine in localhost but get mistakes online. It's hard to describe but everything like pictures tell:
Even worse, if I write code in js like this:
var a='{"status":0,"message":"Operation succeed!"}';
var b=$.parseJSON('{"status":0,"message":"Operation succeed!"}');
It becomes:
And throw exceptions that I can't analyze JSON codes.
This issue is caused by the BOM at the beginning of PHP files.
After using a text editor that allows me to remove the BOMs, the problem is gone.