...

View Full Version : PHP and SSI+, Can't They All Just Get Along?



bluephoenix
02-06-2003, 07:41 PM
Here's the scenario: I'm desiging a website and every page (more or less) uses SSI+'s to insert external header, quick links, resource links, section related links, and footer html pages. All is going well until on one page I need a drop box form. The idea is that a user will drop down a location from the menu, hit the submit button, and the form information will be sent to the next page which display all of the included html files, but also the information for the selected location.

Without templating, How do I include external html files using PHP? Or, how would I set my page up so that it will be parsed by the server as both an SSI+ document and a PHP document?

I'm stumped... Thanks in advance.

brothercake
02-06-2003, 07:48 PM
You can't SSI parse and PHP parse the same page.

If you're using PHP you have no need for SSI at all - there is nothing SSI can do that PHP can't do.

Specifically:

<?

include ("page.html");

?>

bluephoenix
02-06-2003, 08:10 PM
Dude that was so simple! Thanks. I was rummaging on the 'net and through books and all I found was the include_path variable and require(). It works like a dream!

brothercake
02-06-2003, 09:55 PM
No worries; even better - you can pass variables to it:

<?

$variable_that_include_uses = true;
include("dynamic_include.php");

?>

bluephoenix
02-06-2003, 10:09 PM
That's neat. I don't think you can pass variables through SSI+ like you can PHP. I know at least SSI+'s don't like form post methods.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum