php - CI, how to make xml code in controller? -


actually coding ajax , want make xml code in controller file.

how possible write xml code in controller file?

sample of want: in ci controller:

class xml extends ci_controller {   public function my_function(){    //your xml code here     echo $xml_code; //echo output  }  } 

and in script might put this:

$(function() {    $.ajax({    url: '/xml/my_function/',    type: 'post',     datatype: 'string',    success: function(response){      //do want response    }); }); 

Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -