SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2000
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can I use php and ssi in the same index.xxx file?

  2. #2
    SitePoint Wizard jonese's Avatar
    Join Date
    Jul 1999
    Location
    Powder Springs GA (Atlanta)
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in your .php files do this:

    <? include("/full/path/to/file/file.htm"); ?>

    you can use
    .htm
    .html
    .php

    etc for the page extension. .shtml won't be recoginized. (i think)

    ------------------
    Eric Jones - SitePoint Administrator
    http://www.sitepoint.com
    eric@sitepoint.com

  3. #3
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually the include() function just opens the file and sends it to the Web server to be parsed. So basically any file the Web server can handle can be include()'ed.

    Text files of course can always included.

  4. #4
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    include() does not send files to the webserver.. that just dumps it into the location where include() was called

    virtual() executes the called file via the webserver, and the webserver will handle it, whether it is cgi, html, php, asp(yuck), etc..

    -------------------------
    SitePoint Moderator
    my ONLY host . com


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
  •