faqts : Computers : Programming : Languages : PHP : Installation and Setup : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

29 of 44 people (66%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How can I run server side includes (SSI) and PHP together?
How can I call server side includes from PHP scripts?

Jul 7th, 1999 21:09
Nathan Wallace, Ian Kallen


Try this:

    AddType text/html .shtml
    AddHandler server-parsed .shtml
    AddType application/x-httpd-php3 .php3

So then you can say

    <!--#include virtual="/my/php_thingy.php3" -->

and

    <? require("$DOCUMENT_ROOT/ssi_thingy.html" ?>

You can mix and match your content handling as you see fit.  Though I
can't think of anything I can do with mod_include that I can't do with
PHP, but as a migratory/transitional hack, the above will work just
swell.