Welcome Guest, Not a member yet? Register   Sign In
getJSON not working correctly with codeigniter
#2

[eluser]CroNiX[/eluser]
I don't see you sending json headers before you output the json.

I put this in a helper function...

Code:
function send_json($array)
{
  header('Cache-Control: no-cache, must-revalidate');
  header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
  header('Content-type: application/json');
  echo json_encode($array);
  exit();
}


Messages In This Thread
getJSON not working correctly with codeigniter - by El Forum - 03-18-2013, 06:33 PM
getJSON not working correctly with codeigniter - by El Forum - 03-18-2013, 09:04 PM
getJSON not working correctly with codeigniter - by El Forum - 03-18-2013, 09:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB