Page 1 of 1

SSI and PHP

Posted: Sat May 18, 2002 10:12 am
by wildcat
hi, I've been learning php for a few days now and I'm trying to integrate it into my website. I previously used SSI to show my navigation menu. Could someone tell me how to display it using php?

Thanks in advance

Posted: Sat May 18, 2002 10:31 am
by jason
iirc, ssi would be used like this:

Code: Select all

<!--#virtual include="path/to/page.inc" -->
In PHP, it would be:

Code: Select all

<?php include "path/to/page.inc" ?>

Posted: Sat May 18, 2002 10:32 am
by Oxy

Code: Select all

<?php include "file.htm"; ?>

Posted: Sat May 18, 2002 10:45 am
by wildcat
ok thanks, that worked great. Now I also have a CGI script running that displays a random image. I used to call it up (again with SSI) with this

Code: Select all

<!--#exec cmd="script.cgi"-->
How can I call up the same script in php?

Posted: Sat May 18, 2002 10:54 am
by jason
Look at the passthru() function in PHP.