SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: include files

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Belgium
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    include files

    Hi,

    Wondering:
    do includes always have to be named xxxxx.inc?

    or can I just have

    include ("top.htm")

    include ("nav.php")

    Anything to know about these. Thanks

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The extension doesn't matter AFAIK. Any of those extensions should work fine.

  3. #3
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Include files can be named anything. It's recommended that they end in .php so that if they somehow get parsed by the webserver (you should put them outside the web root, but if you don't...), then it will show the output instead of the source code.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Belgium
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Yes, more wondering...

    Ok, .php is best.
    I used a bdconnect.inc but I guess i could/or should call it
    php.

    But my top is a pure html page.
    still call it top.php ? Better or no matter?

    Thanks guys, you're great for newbies.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    don't forget the ; behind your include sentence

  6. #6
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Yes, more wondering...

    Originally posted by George Pauli
    Ok, .php is best.
    I used a bdconnect.inc but I guess i could/or should call it
    php.

    But my top is a pure html page.
    still call it top.php ? Better or no matter?

    Thanks guys, you're great for newbies.
    You don't need to.

    However, to distinguish included files, you can call them .inc.php, or prefix their name with inc. example: inc.top.htm, inc.bottom.php
    [blogger: zengun] [blogware contributor: wordpress]

  7. #7
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Belgium
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks all

    It is now clear to me
    The only truth is that everything is a lie.


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
  •