View Full Version : Comparison between PHP and SSI?
10-22-2003, 01:37 AM
(not sure if this is the right place to ask the question but anyway.. also search didn't let me search for SSI..)
I am trying to broaden my knowledge, and was wondering what the differences between PHP and SSI are. I can't really find a proper explanation of SSI anywhere (opposed to scripting languages like PHP). And what would you use in which circumstances?
10-22-2003, 05:15 AM
Hi , So you cant really compare the 2 as they are 2 different beasts PHP is a fully fledged scripting language , SSI is a server module.
Before PHP became popular SSI was a boon as the current alternatives (CGI PERL) were a whole lot more complex to use than SSI for simple includes etc....
ServerSideIncludes allow you to acces some server/CGI variables in otherwise static pages , its most useful functionality is the inclusion of files eg as standard headers and footers eg..
here the header and footer of the site can be kept in single files that are included in every other page..
<!--#include virtual="/header.html" -->
<p>This pages content</p>
<!--#include virtual="/footer.html" -->
but apart from that and the ability to echo CGI vars thats about it.
PHP has SSI functionality covered by
<?php include('./header.html');?> , echo() and date() functions , but to a far greater extent.
However PHP also has literally several hundred more useful functions from database access to file i/o to regular expressions , image manipulation ... blah.
Which to have ? , well if PHP is available to you then PHP is the obvious choice , even if you currently need only basic SSI functionality you can use PHP for those and still have a powerful language sitting there for if and when you want to use it.
10-22-2003, 06:18 PM
Thanks, it's all clear(er) to me now :D
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.