Welcome Guest, Not a member yet? Register   Sign In
Trying to view a XML instead of PHP or HTML file
#2

[eluser]iainco[/eluser]
You could have your XML in a PHP file simply with no PHP code.

Rename test.xml to test.php, then you can use the code

Code:
$xml = $this->load->view('folder/test', $data, TRUE);

You might not need to pass any data to the view with the $data var.

The last arg TRUE ensures the view contents are returned instead of being output to the browser.


Messages In This Thread
Trying to view a XML instead of PHP or HTML file - by El Forum - 11-25-2008, 06:44 AM
Trying to view a XML instead of PHP or HTML file - by El Forum - 11-25-2008, 07:27 AM
Trying to view a XML instead of PHP or HTML file - by El Forum - 11-25-2008, 02:33 PM
Trying to view a XML instead of PHP or HTML file - by El Forum - 11-26-2008, 10:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB