-----PHP Includes-----
 
PHP Includes is a great way to keep your site going! Have you ever had to update everypage of your site when you need to add a new link on your menu or a new affiliate? It takes forever! That's where PHP Includes Comes in. It's alot like SSI but better because if you want to change a layout on SSI you still have to redo all pages, using PHP you don't!
 
Okay Look Below
All Coding will be put into these little boxes!
 
Now that that is straight we can begin!
 
  1. Make sure your layout is already. Have the menus done. But NOTHING where the content should go.
  2. To make it easier, you should type in: CONTENTHERE where the content goes. NOTHING ELSE.
  3. Open up your layout and view all the coding.
  4. Now Copy this Code from Below:
    <?php
    if (!$id) {
    $id = "main";
    $include = $id . ".txt";
    }
    else {
    $include = $id . ".html";
    }
    if (is_file($include) == "1") {
    ������� include $include;
    }
    else {
    include "404.txt";
    }
    ?>
  5. Find your "CONTENTHERE" In your layouts coding and replace it with that code from above.
  6. Your Layout is ALMOST ready. Next make a SEPRATE page of your homepage with all your news and stuff. Save it: main.txt
  7. OPTIONAL: Its probably best to do this but you don't have to. Make another SEPRATE page called 404.txt. It should say 404 Error or "This Page If Missing". This is so that when you have a broken link that this comes up.
  8. To Make new pages: Make a SEPRATE page with your content. Save it: filename.html (replace the filename with your page's name).
  9. LAST STEP: In order for PHP Includes to work you have to type in a certain URL: Replace all your links on your menu to: http://www.YOURDOMAINHERE.WUTEVER/index.php?id=pagename
  10. so if you wanted to access to an RS page you would type in your domain, then index.php (or the name of your coded layout), than ?id= , Now say the name of the RS page was: RS.html, so add RS after ?id= WITHOUT THE .HTML
You are now ready! Enjoy!
 
NOTE: NOT ALL HOSTS SUPPORT PHP, CHECK WITH YOUR HOST BEFORE YOU TRY THIS.

PokeZam

All Content is © Copyright of Pokemon Sky 2004 - 2008.
Pokemon and All Respective Names are Trademarks
of Nintendo 1996 - 2008.
We are only a respectful fansite.