Welcome Guest, Not a member yet? Register   Sign In
Include .xml view
#1

[eluser]spheroid[/eluser]
I need to create an .xml file as a view....then display the content. However, in my controller I have

Code:
$this->load->view('sample/samplexmldoc', $data);

The file does not have a .php extension but .xml (i.e. views/sample/samplexmldoc.xml).

How can I do this?
#2

[eluser]Colin Williams[/eluser]
Code:
$this->load->view('sample/samplexmldoc.xml', $data);

I believe that will do ;-P Since you are passing $data, I assume, for some reason, you've told your server to run .xml files through the PHP parser. Odd, but whatever.




Theme © iAndrew 2016 - Forum software by © MyBB