If you saw our video blog the other week on designing websites with PHP Includes, then you may have noticed that in the demonstration, we are using Adobe Dreamweaver CS4 to create our files.
If you are also using Adobe Dreamweaver to build a website using PHP Includes, then there is one setting that you want to make sure you have ‘unchecked’.
Essentially, if this setting is ‘checked’ then you might find the pages not validating correctly with W3C’s XHTML validator. You may also be experiencing gaps in the HTML – i.e. padding that cannot be removed.
This is caused when your individual files are encoded with a Unicode signature (BOM). This is essentially a mini stamp that Dreamweaver adds onto your files as you make them. This hidden character is at the start of each individual file and cannot be seen in Dreamweaver. It simply appears as a space in the source coding.
Problems with the Unicode BOM Signature when using PHP Includes.
This hidden BOM encoding character is picked up by the W3C HTML validator, and can cause your page to fail validation when using PHP Includes. The hidden character can also cause problems with margins and padding inbetween your PHP Included files.
To check if you have this setting enabled, simply click on Dreamweaver > Preferences > New Document.
How to disable the Unicode Signature (BOM)
You can then see the setting titled ‘Include Unicode Signature (BOM)’. Simply uncheck this, if you have it ticked and are suffering from the problems mentioned above.

