SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member jbhoo's Avatar
    Join Date
    May 2009
    Location
    Alaska
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why does this site use the .php extension?

    I was looking at this site and the underlying code, its not a cms system It dosen't seem to need a database, and I see no reason for them to use a php extension for there pages?
    Can some one shed some light on this for me why they did this?
    http://www.cornerstoneremodel.net/index.php

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I suspect they used the same logic most people do that use PHP includes; to include content/code to save themselves time having to code common page components such as the navigation menu, for each individual page, etc. Once you have over let's say 10 pages usually it makes more sense to use server-side includes as saves on maintenance time.

  3. #3
    SitePoint Member jbhoo's Avatar
    Join Date
    May 2009
    Location
    Alaska
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks,
    That makes sense.

  4. #4
    Non-Member
    Join Date
    Jun 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    xhtmlcoder hit it right on the spot.

    PHP includes allows me to have 1 page be static (have the design and main navigational links) then I can include the content pages. It saves so much time. Every time I have new content, I just make a simple page with only the content (text) and include it.

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,603
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Using PHP has the advantage over using Server Side Includes that you can expand into using actual logic if you decide that your site requires it. SSI only allows include statements and little more.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  6. #6
    Non-Member
    Join Date
    Jan 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can create other pages by just including a file into PHP code.

    <snip />
    Last edited by cpradio; Mar 23, 2013 at 10:55. Reason: Removed Fake Sig

  7. #7
    Non-Member
    Join Date
    Feb 2013
    Location
    Dallas
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The major feature of PHP is SFS:-Stability, Flexibility and Speed are the chief qualities that attract business owners to choose PHP.

  8. #8
    SitePoint Member
    Join Date
    Aug 2012
    Location
    Houston
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Coding on PHP is comparatively easy than other programming language. Generally owner use PHP as a platform to build their site and adopt WordPress as a CMS.

  9. #9
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,812
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    Closing this thread, it has become a fluff magnet and isn't providing anything useful any more.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes


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
  •