user961644
user961644

Reputation: 75

PHP Include() - Header and Footer

I use php include() for my header, footer, navigation etc.

I have the following code repeated on each of my pages

  <?php include 'includes/header.php'; ?>

Is there a faster way to do this? Can I store the data i am including somewhere for loading speed??

Upvotes: 0

Views: 1316

Answers (1)

Your Common Sense
Your Common Sense

Reputation: 158007

  1. If you aren't experiencing any problems with loading pages, you shouldn't be concerned of a faster ways.

  2. If you're experiencing some problems with page loading, these problems certainly NOT from the way you're including headers. You have to profile your site execution and find real part that slows whole thing down.

Upvotes: 6

Related Questions