Page 1 of 1
What's all this index.php?e=somepage business?
Posted: Wed Jun 05, 2002 7:44 pm
by Grunge
I was just wondering, what's all the PHP hoohaw and what's it do?
... and where can I learn to do something like that?
Thanks.
Posted: Wed Jun 05, 2002 7:55 pm
by Sevengraff
They set up a big template on thier site, usually just a plain layout, then they have something like <?PHP include("$page.html"); ?> where they want to include content. its very useful for sites that change thier layouts a lot.
The best newbie tutorial that I have seen is
Here.
Posted: Thu Jun 06, 2002 12:17 pm
by NetDragonX
Grunge:
When you see an URL which looks like index.php?e=somepage, basically what is happening is this:
Code: Select all
<?php
if ($e == '123')
$include = 'stuff.php';
elseif ($e == 'links')
$include = 'links.php';
require('header.php');
require($include);
require('footer.php');
?>
So when you see a 'page.php?var=stuff', that means the URL actually includes a variable that you can access via PHP. I was looking at that tutorial the guy suggested and I didn't find anything about this, so I hope this helps.
- Dragon
Posted: Thu Jun 06, 2002 12:20 pm
by Grunge
Hmmm. I nderstand. Thanks you two
Do any of you happen to know if that works with actual templates and variable instead of includes? :\ Just a-wondering
Thanks again.
Posted: Thu Jun 06, 2002 12:24 pm
by NetDragonX
Yeah, you can still do whatever you want to do with variables inside of other includes. On my site, my single front page must consist of 20 or so various includes on various levels. The server won't send the webpage to the browser until all parsing is done... and that's includes all includes().
- see ya
Posted: Thu Jun 06, 2002 11:39 pm
by Kriek
NetDragon: Very nice site.
What's with all the banners and stuff though?