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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -