PHP Benefits....
Posted by: parkerlindsey (---.247.195.68.Ahmedabad-dynamic-bb.vsnl.net.in)
Date: September 07, 2009 09:11AM

If you have only a small website of seven or eight pages, it will be easy enough to just put your navigation list on every page manually. However, if you need to change something, you'll have to go back to every page and make your changes. This can be very time consuming even with a small site, but with a larger one of 20 or more pages, it can take hours – especially if you want to make big changes to the design of the navigation list, for example.

If you use GUI web design software such as FrontPage or Dreamweaver, you will probably have a page template which just duplicates on every page. This is a good solution insofar as you can make changes to your whole site without having to repeat them on every page. However, the problem is that if you don't have your GUI web design package available on the computer on which you need to make your changes, you're stuck – you will have to change every page.

At this point, you might cave in and decide to build a framed website, with the navigational links in a side frame and your content in the large centre frame. If you know anything about web design, you'll know that framed websites are, almost without exception, a bad idea – the most obvious reasons being inconsistent browser rendering of framed sites, and the fact that internal bookmarking of a site becomes more complicated to implement.

If your server is PHP-enabled, a far better solution than all of these is a PHP include. Basically, a PHP include inserted into the html of a web page tells the browser to retrieve an html file from the server and include it when it renders the web page. This means that you only need to have one file with your navigation links in it stored on your server, and every one of your web pages can be rendered including this same file. The benefits are clear: if you need to make a change, you need only change your single file and the change will show immediately wherever you have put a PHP include for that file.

goji

Options: ReplyQuote


Sorry, only registered users may post in this forum.