Last active
July 12, 2017 17:03
-
-
Save ilhamsafiudin/a58358add11f3d90cd5ab66c2270981b to your computer and use it in GitHub Desktop.
Helper codeigniter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
function json_output($statusHeader,$response) | |
{ | |
$CI =& get_instance(); | |
$CI->output->set_content_type('application/json'); | |
$CI->output->set_status_header($statusHeader); | |
$CI->output->set_output(json_encode($response)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment