| |
Dreamweaver Tutorials Server side includesUsing Server side code means that when open a document that’s on a web server, the server processes the include instructions and creates a new document in which the include instructions are replaced by the contents of the included file. The server then sends this new document to the browser. Dreamweaver MX2004 allows you to use PHP as a include with we shall cover in later Dreamweaver Tutorials, but first we shall give you a over view of what server side include does. This chapter is designed to give you a primer for the next few Dreamweaver Tutorials in which we will cover server side scripting, this training course is also designed to give you a working knowledge of PHP and MySQL. In Dreamweaver, you can preview documents just as they’ll appear after they’re on the server, both in the Design view and when you preview in the browser. Placing a server-side include in a document inserts a reference to an external file; it doesn’t insert the contents of the specified file in the current document. Dreamweaver displays the contents of the external file in Design view, making it easier to design pages, to help you understand this, it's like a library item change the one file, and it changes on all the pages in your site, if you missed the training course on library items you may wish to go over those tutorials again . You can't edit the included file directly in a document. To edit the contents of a server-side include, you must directly edit the file that you’re including. Any changes to the external file are automatically reflected in every document that includes it. There are two types of server-side includes: Virtual and File. Choose which to use depending on what type of web server you use: If your server is an Apache web server, choose Virtual. (This is the default
choice in Dreamweaver.) In Apache, Virtual works in all cases, while File works
only in some cases. |