Posted by Jeremy on 07/26/06 22:06
greenflame wrote:
> Hello all,
> I have installed apache server on my computer and all it takes to edit
> php files locally.
> everything works, and i can see my index.php file .
> however, the problem is:
> everything which is inside the <?php ?>is ignored.
> i have even done an echo check with the simplest htmk code.
> I'll copy it so you see i've done nothing wrong:
>
> <html>
> <head></head>
>
> <body>
>
> this line can be seen when writing http://127.0.0.1/index.php on the
> address bar but the bla bla is not.
> <?php
> echo "bla bla";
> ?>
>
> </body>
> </html>
>
>
> Heeeeeeeeeeeeelp! I can't figure out why is that :(
>
> Appreciate your rapid response. got some things to work on .
>
> Efry
>
I'm going to venture a guess that your server is not configured to
execute PHP pages. View the source of the result page - five bucks says
you see the PHP source in there (i.e. it looks exactly like your source
code on the server). The reason you don't see "bla bla" is because the
browser thinks <?php ... ?> is just a bad XML declaration or HTML tag
and doesn't display it.
Configuring apache to run .php pages through the PHP engine is
nontrivial if you don't know what you're doing. Be careful.
Jeremy
Navigation:
[Reply to this message]
|