Forum Moderators: coopster

Message Too Old, No Replies

Can I use SSI in a php document?

Can I use SSI in a php document?

         

clarkgray

9:12 pm on Jan 19, 2006 (gmt 0)

10+ Year Member



I am wanting to use ssi to manage a site's navigation elements. Some of the pages on the site are in php.
When I handed the design over to my php programmer, the includes stopped working. Is there something I can do to make them work like add a line to the .htaccess or turn on some server option? OR, is ssi simply not allow in php documents.

Any help would be appreciated.
Clark

abbeyvet

9:14 pm on Jan 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not include them using PHP instead?

Span

9:23 pm on Jan 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some of the pages on the site are in php.

In addition to the previous post - you would have to make your server parse those non-PHP pages as PHP.
On an Apache server, if you're allowed to use an .htaccess, that shouldn't be too difficult.

coopster

1:54 am on Jan 20, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes, you can parse SSI in a PHP-parsed file but you really shouldn't have to. PHP offers all that SSI does and more. However, moving an existing site or whatever the reason, the answer is yes, you can have both SSI in a PHP-parsed page. The discussion here as well as the links in the thread should provide all you need to get it working ;-)

When parsing SSI's, PHP files don't work [webmasterworld.com]