php - JSONP response download as a file? -


when call webservices , response convert jsonp format, @ time response come correctly download file. file format not displayed. download file. try below code.

$result = array(     'result'=>'error',     'errormessage'=>'please enter valid data );  header('content-type: application/jsonp'); return json_encode($result); 

i try echo , print replace of return keyword.

$result = array(     'result'=>'error',     'errormessage'=>'please enter valid data );  $this->output->set_content_type('application/json')->set_output(json_encode($result )); 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -