We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

withremote on 01/22/08


Tagged

include template


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

mbcdg


php index template include


Published in: PHP 


used as "http://www.somesite.com/index.php?xcr=page.php"
page.php is plugged into the template index.php which hold the shell of a site.


  1. <?php
  2. /* THE CODE BELOW CONTROLS THE BODY OF THE PAGE. XCR IS A VARIABLE THAT IS USED IN THE NAVIGATION TO PLUG IN THE APPROPRIATE CONTENT INTO THIS SPACE. */
  3. if ($xcr != "") {
  4. require ("$xcr");
  5. } else {
  6. require ("home.php");
  7. }
  8. ?>

Report this snippet 

You need to login to post a comment.