Coverting SSI to 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
tdnetworks
Forum Newbie
Posts: 2
Joined: Mon Jan 06, 2003 5:27 pm
Location: Atlanta, GA, USA
Contact:

Coverting SSI to PHP

Post by tdnetworks »

Does anyone know a simple way to make all my SSI pages PHP? I'm very new to PHP but want to have it on my website instead of SSI.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

do you have a sample page that we can work with? if all you are doing is including pages together then its a pretty simple change. anything more will take a little work.
tdnetworks
Forum Newbie
Posts: 2
Joined: Mon Jan 06, 2003 5:27 pm
Location: Atlanta, GA, USA
Contact:

Post by tdnetworks »

Yes, all i'm doing is including pages together.
User avatar
Shinmeiryu
Forum Commoner
Posts: 29
Joined: Wed Nov 13, 2002 2:57 am

Post by Shinmeiryu »

This is the way you include files in php.

Code: Select all

<?php
include("file.ext");

?>
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Just a slight adjustment to Shinmeiryu's example, when using include() or require() parenthesis are uneccessary so this:

Code: Select all

<?php 
include("file.ext"); 
?>
can be simplified to this:

Code: Select all

<?php 
include 'file.ext'; 
?>
Check the manual for more examples.

Mac
Post Reply