Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2003
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Comparison between PHP and SSI?

    (not sure if this is the right place to ask the question but anyway.. also search didn't let me search for SSI..)

    Hallo all...

    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?

    Thanks

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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..

    Code:
    <!--#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.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New Coder
    Join Date
    Apr 2003
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, it's all clear(er) to me now


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •