Beginner question
| From: | mike bode | Date: | Tue, 25 Aug 2009 05:16:02 +0000 |
| Subject: | Beginner question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-297195@lists.php.net to get a copy of this message | ||
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
<body>
<?php
echo "Printing with php";
?>
<?body>
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:
<body>
<script type="text/javascript" src="pp.php"></script>
</body>
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?