Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Does php 'includes' function use more processor?



7:23 pm on Nov 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Does php 'includes' function use up more processor?

I have a page with: streaming media and a long questinnaire. The contact info part of the questionnaire will be used on many pages and the rest of the questionnaire will be used on several pages. I want to use the php 'includes' function so that I only have one copy of those elements. The site is for a charity (low budget) but the pages may be popular (much server usage). Will my pages use significantly more server capacity if I use the 'includes' function? Or is there no difference?


7:56 pm on Nov 6, 2002 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I doubt that you would notice a big difference. I have only noticed problems when using nested includes.


11:52 pm on Nov 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

You´ll have another read to load the included file.

But then you probably have a stat call for every directory Apache has to search for .htaccess files unless you disabled them in your server config.

I wouldn´t worry too much about another include.

It´s often a trade off between speed and ease of maintenance. If you want to avoid the disk read and still have your questionaire in a separate file for maintenance think about using an offline tool such as a simple perl or php script that includes the questionaire on upload. I really like offline CMS. Why have the server do the work each and every time a page is requested when some/most of it can be done once offline. I do realise that there are some tasks that need to be done on the server but your include does not.



Featured Threads

Hot Threads This Week

Hot Threads This Month