SSI and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wildcat
Forum Newbie
Posts: 2
Joined: Sat May 18, 2002 10:12 am

SSI and PHP

Post 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
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post 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" ?>
Oxy
Forum Newbie
Posts: 17
Joined: Fri Apr 19, 2002 5:47 am
Location: U.K
Contact:

Post by Oxy »

Code: Select all

<?php include "file.htm"; ?>
wildcat
Forum Newbie
Posts: 2
Joined: Sat May 18, 2002 10:12 am

Post 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?
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Look at the passthru() function in PHP.
Post Reply