> To: firstname.lastname@example.org
> From: mikebo...@hotmail.com
> Date: Mon, 24 Aug 2009 23:16:02 -0600
> Subject: [PHP] Beginner question
> I am trying to use PHP on my web site I am developing now. I have installed
> Apache 2.2 and PHP 5.2. My problem is that I can execute PHP code embedded
> in my HTML code, but I can't execute the same cose when I put it into a
> separate .php file that i then call from within the html code. for example:
> I have a html file with
> echo "Printing with php";
> and it works fine.
> When I take out the php code and put it inot a file pp.php, and I call that
> file with my browser ("localhost/pp.php"), it works, too.
> But when I change the html code to:
> I get a blank page. this is probably something really stupid, but I have
> been wrecking my head for days now, and I can't figure it out. anybody has
> an idea?
You obviously purposefully asked your browser not to parse you php code. You
create a .php file and u wish to incorporate it in your html code, you should
use a function called include();. Simply try something like:
<?php include(pp.php); ?>
Let me know what u get from that.
Serving you from Nigeria.
With Windows Live, you can organize, edit, and share your photos.