PHP Includes
If, like me you make particularly easy tasks particularly difficult for yourself, welcome to my club! For the past two or three months I have been developing a PHP website, testing it on my local Apache server and uploading to the main site. My problem? I was having to change the databse login code everytime I uploaded. The more pages I produced, the more time and effort this took. It was getting out of hand and over-complicated until I remembered PHP includes. By adding some simple code to each page I could use common variables called from one source much like external CSS or Javascript.
Labels: php