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
Post a Comment