Connecting Tech Pros Worldwide Forums | Help | Site Map

Included PHP code not parsed!?!

Y
Guest
 
Posts: n/a
#1: Jul 17 '05
On a hired webserver, the php code that is in the files included with
'include_once' and 'include' command is not parsed. The php file which
includes these parses just fine.

The included php is also parsed just fine on my test apache.

Example:

Request 'www.myurl.com/page.php' on the browser, it runs correctly,
including the file 'menubar.inc' into the outputted content.

The file menubar.inc contains html and php, in the following manner:

<img src="img/LogoV<? echo $tmp; ?>.png" border="0" />

On my test server that would be parse to, for example:
<img src="img/LogoV4.png" border="0" />

Thus displaying an image.

BUT, on the webmotel the html comes out without parsing, as:
<img src="img/LogoV<? echo $tmp; ?>.png" border="0" />

:( ???

I would ask the customer service, but I know it will take +10 days to get
the answer.

Any ideas?

Thanks,
Y

Tommy Gildseth
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Included PHP code not parsed!?!


Y wrote:
[color=blue]
> Example:
>
> Request 'www.myurl.com/page.php' on the browser, it runs correctly,
> including the file 'menubar.inc' into the outputted content.
>
> The file menubar.inc contains html and php, in the following manner:
>
> <img src="img/LogoV<? echo $tmp; ?>.png" border="0" />
>
> On my test server that would be parse to, for example:
> <img src="img/LogoV4.png" border="0" />
>
> Thus displaying an image.
>
> BUT, on the webmotel the html comes out without parsing, as:
> <img src="img/LogoV<? echo $tmp; ?>.png" border="0" />
>[/color]

Don't use short_open_tag (<?) or asp-style tags (<%)
Use <?php

--
Tommy

Closed Thread