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 - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -