SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: SSI in PHP?

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can we use SSI's in PHP scripts?

    thank you

  2. #2
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use this:

    <?php
    include("file.inc");
    ?>
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  3. #3
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    be careful using plain "*.inc" because some webservers don't parse this info and anyone can see the actual script when they enter the scripts location.

    mine was a connection include file for my database and when I entered the url to it's location i could see the password.

    in other words you can also use php3.


    sam

  4. #4
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sam: you're totally right. For sensitive files (i.e. with passwords etc.) I use the extension .php (or .php3 as you suggested) so that the script in the include file will be parsed.

    Golden tip: Don't forget to put <?php ?> around the script in include files, else they won't get parsed! (thanks, Karl)
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.


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
  •