Topic: SSI include to Php include? (Read 1369 times)
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« on: Apr 02, 2007, 01:58:52 am »
i have this php script but to incorporate it into a webpage is thru ssi, (maybe because this script dates back to year 2005 and php is not that common, i dont know.) and the webpage needs to be in shtml format which is not possible for me because mine is in php. here is the sample ssi code it provides:
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Apr 02, 2007, 08:03:57 am »
from the PHP manual:
Code:
<?php
/* This example assumes that www.example.com is configured to parse .php * files and not .txt files. Also, 'Works' here means that the variables * $foo and $bar are available within the included file. */
// Won't work; file.txt wasn't handled by www.example.com as PHP include 'http://www.example.com/file.txt?foo=1&bar=2';
// Won't work; looks for a file named 'file.php?foo=1&bar=2' on the // local filesystem. include 'file.php?foo=1&bar=2';
// Works. include 'http://www.example.com/file.php?foo=1&bar=2';
$foo = 1; $bar = 2; include 'file.txt'; // Works. include 'file.php'; // Works.
?>
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0