How do i include php into a html-page as ssi?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TB2
    Member
    • May 2000
    • 63

    How do i include php into a html-page as ssi?

    Hi!

    I know how to include perl scripts as ssi into html-pages - but how could i include a php-script into an html-page?

    I'm just a php newbie

  • John
    Senior Member
    • Apr 2000
    • 4042

    #2
    You would need to set HTML pages to be parsed by the PHP parser, then you would include the PHP code within the HTML as you would normally:

    <?

    phpcode;

    ?>

    John
    John Percival

    Artificial intelligence usually beats real stupidity ;)

    Comment

    • TB2
      Member
      • May 2000
      • 63

      #3
      Howto?

      Hi John,

      i've edited the following line on my server (FreeBSD, Apache) like this:

      Code:
      AddType application/x-httpd-php3 .php3 .phtml .php .html .shtml .htm
      Is this right?
      Is this enough?

      If i create a simple html-page and include your lines like this:

      Code:
      <html>
      <head>
      </head>
      
      <body>
      Test!
      <? 
      phpcode; 
      ?> 
      End!
      </body>
      </html>
      i'll only see "Test!End!" on my screen ... ?

      Any hints for me?

      PHP works fine but i want to include php's like the active topics hack into a html-page ...

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...