• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.