Using php include in an .html page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhills
    Member
    • Mar 2004
    • 75

    Using php include in an .html page

    I'm going to put a few php includes in some .html pages. In researching this, it seems I have to add a line to the htaccess file. A tutorial recommended adding one of the following two lines to the htaccess file:

    For a normally configured web server:
    AddHandler cgi-script .html .htm

    A web server running FastCGI:
    AddHandler fcgid-script .html .htm

    What I need to know is which those two lines to add to the htaccess file. I haven't a clue whether the dathorn servers are running FastCGI

    Can someone please advise.
  • AndrewT
    Administrator
    • Mar 2004
    • 3653

    #2
    Neither of those will work. To use PHP code in a .html file you need to force your .html files to be executed by PHP. You would add the following to your .htaccess file:

    Code:
    AddHandler application/x-httpd-php .html

    Comment

    • bhills
      Member
      • Mar 2004
      • 75

      #3
      thanks, will do...

      Comment

      Working...