You are here: Include .php file, flock? « PHP Programming Language « IT news, forums, messages
Include .php file, flock?

Posted by Jason on 08/13/07 21:47

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация