I basically want my website in such a way that when I edit the php menu file once it will take effect for every other file like CSS. What would be the code to do this? Sorry again for the newbie question. Thank you in advance.
Frank_Rizzo
3:07 pm on Dec 3, 2006 (gmt 0)
You just need something like this:
include('menu.php');
If you have sub directory pages then you'll need the full directory structure path such as
include('/home/mysite/menu.php');
Your menu.php must have <?php?>
<?php menu here.... ?>
mcibor
11:20 am on Dec 5, 2006 (gmt 0)
I would recomend
require_once('menu.php');
this way if you somehow will try to include the file twice there won't be any problems and no errors.
Michal
jatar_k
5:58 pm on Dec 5, 2006 (gmt 0)
maybe try this thread from our PHP Library [webmasterworld.com]