This is a discussion on HOW TO: get index.php?page=blah ? within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; Ever wondered how to get index.php?page=blah ? Well, here is a simple way, using flat files. First of all, all ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| WMT Addict | Ever wondered how to get index.php?page=blah ? Well, here is a simple way, using flat files. First of all, all you pages will run off index.php, so make a backup of it regularly! Get a blank copy of your "index.php" and where the content will be, enter the following php include: <?php include("content.txt"); ?> Save "index.php" & upload it to your ROOT directory of you site. Now, open up a editor and paste in the following code: <?php if (isset($page) && file_exists('includes/' . $page . '.html')) { include('includes/' . $page . '.html'); } else { include('includes/news.html'); } ?> Save this as "content.txt" and upload it to the ROOT of your site. Now, make a directory on your site called "includes". Now, upload all your content, BUT, make sure it's just the text, no formatting, template etc. and MAKE SURE that the extension is ".html". Upload all content into the "includes" directory, and viola! You got a basic php site running! Linking To link, use: index.php?page=*THE NAME OF YOUR HTML PAGE IN THE INCLUDES DIRECTORY* |
| | |
| Tags |
| indexphppageblah |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Page showing up in UK Index only | adithecool | Search Engine Optimisation (SEO) | 1 | 11-08-2007 08:35 |
| Index page doesn?t stop loading itself. WHY? | ivanmax | Website Design Forum | 3 | 06-02-2006 20:35 |
| Centering a page | FrozenDice | Website Development Forum | 2 | 15-07-2005 17:42 |
| New Free Scripts Index - Hotscripts Clone | geoffb59 | Ads, Offers & Services | 2 | 30-04-2005 00:40 |
| Photo Page | woodflooristcom | Search Engine Optimisation (SEO) | 2 | 24-02-2005 17:36 |