Monday, 21 June 2010

Website development with PHP

We use PHP in the majority of our web development projects. It is open source, allows the quick development of complex websites and is very flexible. One of the simplest improvements PHP offers over sticking to basic HTML is the use of include files. These are files containing code which is repeated throughout the site. It may be the header, footer, navigation or a particular 'widget' which appears in several parts of the website. If the site is built in HTML then the code for this section would need to be repeated every time it appears, leading to major headaches if anything needs to be changed - if an extra link needs adding to the navigation for example. Building in PHP and using include files means that the code only needs to be written once, it can then be 'included' in every page it is required with a single line like:



<? include_once "include/navigation.php" ?>




Thus saving time, minimising code replication and making future updates much easier to handle.

No comments:

Post a Comment