|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dynamic Linking with PHP
Dynamic linking and page generation is a very useful tool for your website. It makes every site follow a specific template for site consistency so its easy to change designs. Here is an example of one done in PHP.
<?php switch ($page) { case "news": include('news.html'); break; case "about": include('about.html'); break; case "contact": include('contact.html'); break; default: include('start.html'); } ?> An example link to the "news" page would be http://domain.com/index.php?page=news. Going to this site would add news.html to the rest of the html. Knowing this, you can go crazy and make some page specific commands! Note: Google does not like pages that use this script. However, you can use the apache mod_rewrite module to change the url to be more cache friendly. I'm not quite sure how to do this. For for information visit: http://www.dotdragnet.com/content.php?aid=18 Enjoy! Last edited by plutonium83 : 09-01-2005 at 09:41. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Speaking of PHP 5... | Ryan M. | IT / Communications | 3 | 01-08-2004 16:46 |
| openFIRST PHP 5 Compatibility | Timothy D. Ginn | FIRST-related Organizations | 0 | 30-07-2004 13:45 |
| PHP and Wiki Error | Venkatesh | Website Design/Showcase | 2 | 24-07-2004 15:51 |
| php vs. perl | Jack | Website Design/Showcase | 20 | 29-12-2002 17:01 |
| What's better, PERL/cgi or PHP/my_sql? | mikefrei | Programming | 10 | 27-05-2002 22:50 |