php index template include


/ Published in: PHP
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.