Created
June 14, 2013 09:27
-
-
Save siteslave/5780625 to your computer and use it in GitHub Desktop.
how_to_jsonp
This file contains 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 | |
$cb = $this->input->post('callback'); | |
$rs = $this->epidem->get_epidem($date_start,$date_end); | |
$rows = json_encode($rs); | |
$json = $cb . '({"success": true, "rows": ' . $rows.'})'; | |
// don't render json | |
#$this->_render_json($json); | |
echo $json; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment