[eluser]Unknown[/eluser]
Hi,
I am a novice in CI and i have questions about some solutions, the first is:
I have a function like this in my controller:
Code:
function testAjax()
{
$this->output->set_header('Content-type: text/xml');
$this->output->set_output('<?xml version="1.0" encoding="ISO-8859-1" ?><root>content</root>';
}
but i know i can do somethink like that:
Code:
function testAjax()
{
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="ISO-8859-1" ?><root>content</root>';
}
the second solution use only php core functions.
Do you agree that the second solution is better (faster, portable)?
Is there any motive to use first solution?