Welcome Guest, Not a member yet? Register   Sign In
XML causing an error
#1

[eluser]tdktank59[/eluser]
So for some reason in my view file I hate this line of code

Code:
<?xml version="1.0" encoding="utf-8" ?>

And for some reason it throws an error when I call the file.

any ideas? this is valid xml tags so I don't get why it is doing this

Code:
function index()
{
$this->load->view('file1');
}

Fresh install of CI, nothing autoloaded. configured enough to make it work.
#2

[eluser]wabu[/eluser]
What's the error message? I tried a quick test and it works for me.
#3

[eluser]tdktank59[/eluser]
Quote:[24-Sep-2009 17:52:00] PHP Parse error: syntax error, unexpected T_STRING in /home/fourtwo1/public_html/dirt/application/views/blah.php on line 1
#4

[eluser]wabu[/eluser]
Oh, I get the same error with short tags enabled (guess it's trying to parse it).
#5

[eluser]BrianDHall[/eluser]
Yes, this is a tad annoying, so here is fix:

Code:
<? echo '<?xml version="1.0" encoding="utf-8"?>' ?>
#6

[eluser]tdktank59[/eluser]
[quote author="BrianDHall" date="1253848526"]Yes, this is a tad annoying, so here is fix:

Code:
<? echo '<?xml version="1.0" encoding="utf-8"?>' ?>
[/quote]

Short tags are off...
Or I guess its php doing it...

O the joys of php lol




Theme © iAndrew 2016 - Forum software by © MyBB