Re: Help with Dreamweaver templates
Don't worry about the code outside of the HTML document -- it's not served to the browser; it's processed by the PHP interpreter. (PHP has its own native includes method that works something like SSI, but with a great deal of programmatic control.)
The DW server behaviours are just a set of callable PHP functions that are essentially the same as the ones used in IIS on a Windows server for ASP(X), and so on -- by keeping the same code generation in Dreamweaver and just changing the server behaviour components for different web servers, the DW client has a lot less work to do.
It's what's sent to the browser that counts. If that goes bad, then do a View->Source of the web page and post the rogue code here.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)