Web Hosting Forum - A Web Hosting community for Webmasters


Divi WordPress Theme

Author Topic: Building an Easier Site with PHP Modules  (Read 2243 times)

0 Members and 1 Guest are viewing this topic.

Offline Tech

  • Junior Guru
  • **
  • Posts: 183
  • iTrader: +2/-0
    • View Profile
Building an Easier Site with PHP Modules
« on: August 31, 2007, 01:48:03 AM »
Having hundreds of pages to manage can be a lot of work when it comes to revisions, such as changing the site menu or a list of links.

I have found an easier way to keep my editing time to a minimum with using what I call PHP Modules.

For example, we'll build a menu module, we'll cut all of our menu images & links from our pages leaving behind only the empty tables & then create a new page menu.php without any headers and paste our menu code.

Then in the empty tables we'll add the code:
< ?php
include_once "menu.php";
? >

Now the next time I need to change the menu I'll only need to edit menu.php & the other 300 pages will automatically be updated, slick right?

Note: To use this PHP code you'll need to change all of your pages from .HTML to .PHP or use a java script to parse the PHP code. You wont need to change any of your html code as web browsers will render your pages the same way as .html

I recommend changing your pages to PHP because once you start working with PHP you will find a lot free scripts that you can use to make your site more exciting & interactive than with html alone.

Article Source: http://EzineArticles.com/?expert=Mike_Mason
« Last Edit: January 01, 1970, 05:30:00 AM by Tech »

Divi WordPress Theme
Tags:
 

Related Topics

  Subject / Started by Replies Last post
1 Replies
3460 Views
Last post August 13, 2009, 12:39:22 AM
by Kailash
0 Replies
1536 Views
Last post April 05, 2010, 09:22:11 AM
by jacksonp
85 Replies
13906 Views
Last post January 16, 2013, 09:29:25 AM
by Steve Smith
7 Replies
2368 Views
Last post January 29, 2013, 11:56:13 AM
by Steve Smith
3 Replies
1089 Views
Last post March 26, 2013, 04:18:04 PM
by Steve Smith