php code in html pages

Discussion in 'PHP' started by devin, May 2, 2006.

  1. Danny

    Danny Active Member

    Messages:
    732
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    78
    #21
    Can you please post the source of your HTML file here?

    Does it still have the <?php and ?> tags in it?

    also try adding the following to your HTaccess instead. As it may be running in CGI mode instead

    
    
    Options +ExecCGI +Includes 
    AddHandler server-parsed html 
    AddHandler cgi-script cgi PHP html
    
    
    Code (markup):

    Then create a new php/HTML file with the folowing and run it

    
    #!/usr/bin/php4 
    <!--#echo var="DATE_LOCAL" --> 
    <?PHP phpinfo();?> 
    
    Code (markup):

    IF this does not work, you may need to make changed in your httpd.conf
    httpd.conf file
    
    AddHandler server-parsed html 
    <Directory "/where/htaccess/file/is/stored"> 
     AllowOverride all 
    </Directory> 
    
    .htaccess
    
    Code (markup):
    
    Options +ExecCGI +Includes 
    AddHandler cgi-script cgi PHP html 
    
    
    Code (markup):
     
    Danny, May 3, 2006 IP
  2. Gurpartap

    Gurpartap Peon

    Messages:
    221
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Thanksss!! :)
     
    Gurpartap, May 4, 2006 IP