Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

include() speed question

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

include() speed question

Postby p3x » Wed Mar 12, 2003 3:45 am


Maybe someone can shed some light on this issue... 'does include() speed up or slow down a script?'
I wondered this because as it is now all my pages look something like this:

Code: Select all
<?php include 'start.php'; ?>
HTML garbage here
<?php include 'header.php'; ?>
more HTML garbage here
<?php include 'center.php'; ?>
even more HTML garbage here
<?php include 'middle.php'; ?>
and yet more HTML garbage here
<?php include 'footer.php'; ?>

In short: a lot of includes. Is this faster or slower then putting the php code directly into the page? :?

New php-forum User
New php-forum User
Posts: 17
Joined: Mon Mar 03, 2003 10:53 am

Postby Skeletor » Wed Mar 12, 2003 4:18 am

I imagine it will be just a tad slower since it has to open other files that include the code. I’ve never noticed much difference to justify not doing it. Plus the time you save on maintaining your site with only having to change/update a handful of included files instead of a few dozen scripts is well worth it.
New php-forum User
New php-forum User
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio

Re: include() speed question

Postby WiZARD » Wed Mar 12, 2003 5:22 am

Actually it's slow but more effective
User avatar
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.