|
|
|
|
![]() ![]() |
Feb 3 2007, 12:22 AM
Post
#1
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,314 Joined: 11-January 06 From: Chennai, India Member No.: 16,932 |
i'm a noob in php programming, i can understand and modify php programs, but i dont know to write on my own. So please somebody who is well versed in php help me. My need is,
I'm currently builiding a knowledge base website , i've my own design for the website, check here, http://laschatz.info/kzone/ Each page in the left hand site has a tree navigation of all the topics available. Since this information must be same in all the pages, presently I need to change all the pages after adding a new category. Could you please help me in such a way that I can add this content in one file, say a text document and that will be updated to all the pages, by including the file in all the pages. the tree list coding contains only a set of html ul and li tags. please help me. can this be done using server side includes, if so please provide information. |
|
|
|
Feb 3 2007, 12:52 AM
Post
#2
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 57 Joined: 23-January 07 Member No.: 37,683 |
Just create a file don't matter the name.
Then take the code from the navigation and put it in that page. Then on the pages were you want the navigation to appear put this: <?php include("menu.php"); ?> But make sure the pages with "<?php include("menu.php"); ?>" are saved as a .php file. Good luck. |
|
|
|
Feb 3 2007, 02:52 AM
Post
#3
|
|
|
Ephesians 6:10-17 ![]() Group: [MODERATOR] Posts: 1,918 Joined: 22-June 05 From: The World of Gentoo Member No.: 8,528 |
Just create a file don't matter the name. Then take the code from the navigation and put it in that page. Then on the pages were you want the navigation to appear put this: <?php include("menu.php"); ?> But make sure the pages with "<?php include("menu.php"); ?>" are saved as a .php file. Good luck. To be more precise: Cut the "tree list" code, make a new file named "menu.html" or "menu.php" or "menu.txt" or whatever in the same directory, and paste the "tree list" code into that newly-created file. Then, on the page on the same spot the "tree list" code was at, place the following: CODE <?php include("menu.html"); ?> Where menu.html is the name of the file you created.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 05:29 PM |