SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    WebAmoeba mythix's Avatar
    Join Date
    Aug 2002
    Location
    here
    Posts
    578
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    include() OR #include

    Hi,

    I have a large site and am considering whether to use the php include() or the SSI #include function.

    The files that will be being included will all be PHP files.

    The majority of the files using the include functions will be HTML files.

    Am I better to change the MIME types for SSI to include htm and hml, or am I better to change the MIME types for PHP to ionclude htm and html???

    i am thinking probably SSI because its a 'small' language it shouldn't add too much strain to the server??
    Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.

    http://www.webamoeba.co.uk

  2. #2
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    If the files only contain xHTML then I'd use SSI but if they contain PHP then I'd use PHP to include them

  3. #3
    WebAmoeba mythix's Avatar
    Join Date
    Aug 2002
    Location
    here
    Posts
    578
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sounds good to me!
    Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.

    http://www.webamoeba.co.uk

  4. #4
    WebAmoeba mythix's Avatar
    Join Date
    Aug 2002
    Location
    here
    Posts
    578
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmmm, is it possible to use SSI #include to include the following???

    \inc\somefile.php?dcid=99
    Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.

    http://www.webamoeba.co.uk

  5. #5
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use PHP's include(), it's far less server intensive than SSI.

  6. #6
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mythix
    hmmmm, is it possible to use SSI #include to include the following???

    \inc\somefile.php?dcid=99
    as far as i know, SSI's include can only include files which are in the server's document root, whereas php's include can - depending on how the server's privileges are set up - roam around the filesystem in general and grab files. additionally, if you're having problems with includes like the above (with dynamic code that needs to be run) in SSI, you can change your include to do an http request, e.g.
    Code:
    <!--#include virtual="http://www.yoursite.com/inc/somefile.php?dcid=99"-->
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  7. #7
    WebAmoeba mythix's Avatar
    Join Date
    Aug 2002
    Location
    here
    Posts
    578
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use PHP's include(), it's far less server intensive than SSI.
    surely SSI is less intensive? cos it's tiny?
    Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.

    http://www.webamoeba.co.uk

  8. #8
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mythix
    surely SSI is less intensive? cos it's tiny?
    Size has nothing to do with it.


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
  •