Welcome Guest, Not a member yet? Register   Sign In
I have problem with .php file, and html code
#1

[eluser]nemanjanq[/eluser]
I have simple file.php which have only html code, for example:

Code:
<html>
<body>
<p>bla</p>
&lt;/body&gt;
&lt;/html&gt;

And I get error, this should work, right ?
#2

[eluser]nemanjanq[/eluser]
hm, it works on new CI installation, I am following one of the screen-cast from CI site, and it that example I can not make header.php to work, ... it only have html code.
#3

[eluser]nemanjanq[/eluser]
this one http://www.haughin.com/screencasts/
#4

[eluser]nemanjanq[/eluser]
I removed &lt;?xml .... > from the top of file and it works... why? Smile) sorry for the topic Big Grin
#5

[eluser]pistolPete[/eluser]
In your php configuration short_open_tag is enabled.
#6

[eluser]nemanjanq[/eluser]
Yap, its enabled.
#7

[eluser]pistolPete[/eluser]
Well that was the answer to your question:
Quote:and it works… why?

If your server accepts short open tags, &lt;?xml erroneously is interpreted as a php open tag.
#8

[eluser]nemanjanq[/eluser]
Correct. Thanks! That is why in screencast he puts
Code:
$config['rewrite_short_tags'] = TRUE;
. Thanks!
#9

[eluser]pistolPete[/eluser]
Using rewrite_short_tags doesn't help you here.
It's used to run code containing short tags on servers which do not support short tags.
#10

[eluser]nemanjanq[/eluser]
Ok, thanks! Smile




Theme © iAndrew 2016 - Forum software by © MyBB