Welcome Guest, Not a member yet? Register   Sign In
viewing the output buffer
#2

(This post was last modified: 10-27-2018, 04:42 AM by richb201.)

OK. After over a month of trial and error and banging my head against the wall i figured it out (or a workaround). I now use:
           header('Content-type: application/json');
           header("Access-Control-Allow-Origin: *");
           echo ($json);

instead of

  $this->output
      ->set_content_type('application/json')
      ->set_header("Access-Control-Allow-Origin", "*")
      ->set_output(json_encode($table));
proof that an old dog can learn new tricks
Reply


Messages In This Thread
viewing the output buffer - by richb201 - 10-26-2018, 12:20 PM
RE: viewing the output buffer - by richb201 - 10-27-2018, 04:39 AM
RE: viewing the output buffer - by jreklund - 10-27-2018, 07:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB