php embed into html

Discussion in 'PHP' started by piropeator, Sep 19, 2009.

  1. #1
    Ok, I have this code (test.html), with PHP code embed into html code.

    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <?php
    echo dirname(__FILE__);
    ?>
    </BODY>
    </HTML>

    But does not work.:mad:
    (I have PHP.5.2.2)
     
    piropeator, Sep 19, 2009 IP
  2. Oli3L

    Oli3L Active Member

    Messages:
    207
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    70
    #2
    The code has no errors, it should be working fine.

    Maybe you have another code which makes it not working...
     
    Oli3L, Sep 19, 2009 IP
  3. MDV

    MDV Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe file test.html executes as HTML. Try to rename it to test.php.
     
    MDV, Sep 19, 2009 IP
  4. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #4
    theapparatus, Sep 19, 2009 IP