#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    14
    Rep Power
    0
    Hi, I'm working on a web site that has a common header,navigation links, and footer.

    I'm thinking of just writing 3 funtions:
    function header()
    function navigation()
    function footer ()

    and saving them on a common file (something like functions.php)

    Then calling the functions in each page?

    Will this affect how fast the web page loads?
    Will it take longer for the page to load since it has to get part of the page from another file (functions.php)?

    I've read a lot of stuff on templates (www.phpbuilder.com), but I think just using functions will work fine for me since I'm not expecting to do anything too fancy with the page.

    Thanks

    Mike
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    Yes, there is a very small performance hit due to additional filesystem accesses. Template constructs have an even bigger performance hit, though. It's a give and take between performance and ease of modification.

Similar Threads

  1. Nested templates in Dreamweaver MX 2004
    By switcha in forum Web Design Help
    Replies: 2
    Last Post: January 30th, 2004, 08:35 AM
  2. Hardware (un)support for performance counter.
    By peenie in forum Computer Hardware
    Replies: 0
    Last Post: October 28th, 2003, 12:48 PM
  3. Replies: 1
    Last Post: February 15th, 2002, 09:46 AM
  4. int performance
    By wifpwcs in forum MySQL Help
    Replies: 1
    Last Post: February 8th, 2002, 01:13 PM
  5. templates, templates, templates..
    By MkJnr in forum PHP Development
    Replies: 7
    Last Post: January 20th, 2002, 09:00 AM

IMN logo majestic logo threadwatch logo seochat tools logo