Page 1 of 1

Coverting SSI to PHP

Posted: Mon Jan 06, 2003 5:27 pm
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.

Posted: Mon Jan 06, 2003 5:55 pm
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.

Posted: Mon Jan 06, 2003 7:05 pm
by tdnetworks
Yes, all i'm doing is including pages together.

Posted: Mon Jan 06, 2003 7:48 pm
by Shinmeiryu
This is the way you include files in php.

Code: Select all

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

?>

Posted: Tue Jan 07, 2003 3:40 am
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