Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X: Part 3
Subject:   php AND ssi?
Date:   2003-03-26 06:19:31
From:   morbus
Response to: php AND ssi?

If you're trying to get SSI and PHP working together through one .php file, that's impossible in Apache 1.3. You can either have PHP in .php files, or SSI in .php files - you can't mix and match them.


Ignoring the above, it sounds like .php (which may or may not have been associated with mod_php) is being handled by the SSI part of Apache, and since no MIME-type has been defined for .php, your browser doesn't know what to do with it. You'll want to add .php to:


AddType text/html .shtml


But, remember, you can't use PHP and SSI in the same file. It's one or the other. Apache 2.0 purportedly will allow you to do this by setting up filters, but I've yet to experiment with it.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • php AND ssi?
    2003-04-02 03:37:25  anonymous2 [View]

    I'm Just starting out with PHP, but it strikes me as logical to use the PHP function include() when wanting to include files.

    EG.
    <?php include("include_this_file.html"); ?>

    (of course the icluded file could also be .php)

    Another option is that it appears that you can include .php files into .shtml files, and the PHP gets Parsed correctly.

    EG.
    <!--#include file="info.php"-->

    I've tried it with a sample and works fine, though am unsure of Pro's/Con's within a larger web application.

    Hope this helps.