Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8935315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:57:45+00:00 2026-06-15T09:57:45+00:00

I was just curious, would there be any good justification for using SSI instead

  • 0

I was just curious, would there be any good justification for using SSI instead of PHP’s include in a LAMP environment? I cannot really think of any good argument in favor of it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:57:46+00:00Added an answer on June 15, 2026 at 9:57 am

    TL;DR: Don’t use SSIs. If you are only including 100% static HTML, (not another include() or anything) use readfile() .. Else, just use include() and make sure any random person can’t write to those files as I would hope anyone would do.

    SSI includes can be a major pain since they’re dependent on Apache in particular (try getting nginx to read SSI’s .. it’s NOT fun) and have zero advantage EXCEPT ……

    If the file in question, whether is to be SSI included, or PHP included — if it has insecure write permissions or for any reason an untrusted source is able to write to it, it becomes a major concern. Keep in mind, when you include() then you are executing PHP code.

    There are SSI directives that can do exec as well (#exec), which is also dangerous, but may have a more limited scope than PHP itself (or, it might be even more dangerous, that is extremely dependent and subjective to each particular situation)

    However, if the file in question you want to include does not, and never will, contain PHP code and only HTML, please do not use include(), instead use:

    echo file_get_contents('filename.html');
    

    As this will be much safer, as nothing is ever executed. Or you could also use readfile, which may be more effecient if you’re handling very large (10MB+) files being included:

    readfile('filename.html');
    

    Therefore, it may be a slight opinion of mine that you should use PHP instead of SSI, but I can tell you from experience SSI’s can become unmanagable and have no more benefit than at least file_get_contents() or readfile(), while include() has the special feature that if it contains PHP code (good or bad), it will be executed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just curious if there is anyway to display an objects retain count using NSLog.
I'm just curious (this is after HEAVY searching) if there are any classes for
Just one curious question from me, is there any transformation function in linq. I
I'm curious if there are any good Android Drawing Tutorials for drawing sprites. Specifically,
Just curious how you would comment this line of code: string customerNm = customerNm.EndsWith(s)
Just curious, is there a format string I can use to output something like
Just curious. Right now I'm using Visual C# Express 2008 for Desktop Apps, and
Just curious to find out exactly what problems I'll cause myself if I include
Is there any good, simple Java Grep Library? I'm not opposed to native code,
when using OnRender to draw something on the screen, is there any way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.