|
Posted by Jerry Stuckle on 08/13/07 22:59
Jason wrote:
> My site utilizes a header.php and footer.php, which I used to use as
> an include on every other page of the site; ie,
>
> <html>
> <head>
> <title>My page</title>
> </head>
>
> <body>
>
> <?php include "header.php"; ?>
>
> Body
>
> <?php include "footer.php"; ?>
> </body>
> </html>
>
> Both the header.php and footer.php includes navigation, logo, the
> results of a few cookies and text files, etc.
>
> This worked out great for awhile, but as the traffic increased, it
> started forcing the pages to run SLOW. And by "slow," I mean that it
> could take 3 or 4 minutes for a page in my message board to open. I
> was able to resolve this by taking the header.php file and put it
> directly in the message board itself, eliminating the "include" on
> that program.
>
> However, this makes it a bit cumbersome to add or modify things in
> that section, since now I have to do it twice. So, I'm revisiting the
> idea of using a single header.php and footer.php for the entire site.
>
> My message board has has had up to 400 accesses per second before.
> That's certainly not an average, but a peak. Knowing this, is there a
> smarter way to include a header.php throughout the entire site than
> what I posted above?
>
> TIA,
>
> Jason
>
Jason,
Something's wrong. Just including a file shouldn't slow things down
that much. There's a little overhead - but not that much!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|