making making more pages in one php file
Moderator: General Moderators
making making more pages in one php file
I noticed many websites that have a index.php file and it shows other pages in that index file for example: (index.php?links show links.php) i was wondering how to do this code any helpers?
-
Darkzaelus
- Forum Commoner
- Posts: 94
- Joined: Tue Sep 09, 2008 7:02 am
Re: making making more pages in one php file
The '?' you are seeing says that the 'links show links.php' part is actually a $_GET variable.http://www.w3schools.com/PHP/php_get.asp
The site probably checks, from that variable to see if the file exists, then if it does, either uses:
Probably include, as if you use require and the file isnt there, php gives you a big fat error.
Cheers,
Darkzaelus.
The site probably checks, from that variable to see if the file exists, then if it does, either uses:
Code: Select all
include(); //OR
require();
Cheers,
Darkzaelus.