SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    right....
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP + SSI = Does it work?

    Can PHP and SSI script work? Can I have PHP pages at directives? If not..is there a way through it?
    Sorry Sarah

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would you want to? PHP can do EVERYTHING SSI's can do and then some. Plus, SSI's require additional server processes, while PHP does not. It's not really a choice. Just go with PHP. =) Happy coding!
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    right....
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    GAH! PHP IS SO HARD! Thanks anyways
    Sorry Sarah

  4. #4
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP isn't hard! =) At least for the SSI replacement functions, it's a piece of cake. Let me know what exactly you're wanting, and I'll write you a small piece of code that'll do everything you want. You'll be surprised....
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  5. #5
    SitePoint Zealot honging's Avatar
    Join Date
    Jan 2001
    Location
    Chapel Hill, NC
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, PHP is much better... I forget right now, but I believe PHP has an include statement that functions exactly as a SSI. =)

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This:
    <?php include("fragments/somepage.php3"); ?>

    does the same thing as this:
    <!--#include virtual="fragments/file.ssi" -->
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Creole hit it right on the mark. I've been using include() for a long time, and it works great. Plus, I read somewhere that PHP is a lot more efficient and even faster than SSI's ... so it's a good bet to go with PHP.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  8. #8
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP is not difficult. At least with sitepoint community's php experts... *grin*

    I can do stuffs in php faster and more efficiently then in perl right now. bleh
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  9. #9
    SitePoint Enthusiast subBlue's Avatar
    Join Date
    Jun 2001
    Location
    Edinburgh, UK
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The host i'm using for a current project will allow .shtml pages include .php files and the php code will be compiled as required, however, you can't pass variables to a .shtml page containing an included php file.

    I used it for a news headline page, it mean't that i could use the same template as the other pages, rather than making a new php template (got to keep things simple for the client )
    Become Interactive because its all gone a bit subBlue


Bookmarks

Posting Permissions

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