embedded php doesn't work

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J

    embedded php doesn't work

    Although a standalone .php page works just fine, if I embed php into an html
    page it doesn't work. Here's a part of what I'm trying:

    <body>
    <p>Hello World</p>
    <?php echo "<p>now is the time</p>"; ?>
    <p>Bye</p>
    </body>

    I've also tried:
    <script language='php'> echo "<p>now is the time</p>"; </script>

    Thanks.


  • Erwin Moller

    #2
    Re: embedded php doesn't work

    J wrote:
    [color=blue]
    > Although a standalone .php page works just fine, if I embed php into an
    > html page it doesn't work. Here's a part of what I'm trying:
    >
    > <body>
    > <p>Hello World</p>
    > <?php echo "<p>now is the time</p>"; ?>
    > <p>Bye</p>
    > </body>
    >
    > I've also tried:
    > <script language='php'> echo "<p>now is the time</p>"; </script>
    >
    > Thanks.[/color]

    How did you name your page?

    If you named your page test.html instead of test.php....

    If you want php to be executed, use the php extension.

    Good luck,
    Erwin

    Comment

    Working...