A Beginners Guide to Server Side IncludesWritten by Kabooli Directory Editors
Continued from page 1
What are we including on server side? Perhaps it would be better to think of includes as "modules" that we can insert into our web pages. These modules (or "includes") are usually just text files that contain HTML code (although they can be other file formats). The code inside these files can be inserted anywhere in a page simply by using an include command. For example, imagine for a moment that our freelancer had foresight to realize that navigation menu would change at some point in future. Instead of putting code for navigation menu into each individual page, freelancer placed this code into a separate file. For sake of example, we can call this file nav-menu.html Our freelancer can now simply place an "include" command that refers to nav-menu.html anywhere he/she wants to place this menu. The advantage of this is becomes apparent when our freelancer needs to modify navigation menu. Just one file needs to be edited, nav-menu.html, and all pages containing "include" refering to this file will automatically update themselves. This time savings is primary advantage of using includes. OK, I get it, but what does an include look like? Even though this is not a "technical" article, many of you are probably wondering what an "include" looks like. Therefore, one example for PHP is included below. Please note PHP is just one type of scripting language that can be used, depending on what your server is running. In this example, code contained in file "nav-menu.html" will be inserted into any web page where following code is placed:  Keep in mind that, for technical reasons, server side includes will never be visible when you view source code for a page in your browser. This is because include happens on server (before presenting resulting code to browser). This makes use of SSIs invisible to browsers, bots, spiders (which is why they are search engine friendly) Summary The catch-22 of server side includes is that need for them only becomes apparent when faced with task of updating tens or hundreds of pages of code. There are many resources on web that will instruct you how use virtual includes, and procedures will vary depending on type of scripting language supported by your server (e.g., ASP, PHP). Hopefully you now understand Server Side Includes and how they can benefit webmaster.
About authors: This article was written by editors of Kabooli Internet Directory. This article may be used freely in opt-in publications and websites as long as article not changed in any way and all links in Authors section are active . A courtesy link to any online posting would be greatly appreciated and can be sent to editors of Kabooli Directory by using the Kabooli Internet Directory Contact Form

This article was written by the editors of the Kabooli Internet Directory.
| | Building Your First Web Site?Written by TQ
Continued from page 1
Ok! You've sketched a layout for your web page, learned some basic html, coded your web page, found your host with most (couldn't resist), and registered your URL (www.YourSite.com). Now it's time to upload (transfer) your file (web page ) to your host. To do this you need a FTP program. FTP stands for File Transfer Protocol. When using this application, there are usually two windows. The left window shows your computer files, and right window shows files stored on your host. For a good tutorial and to download a freeware FTP program, FTP Commander, go to http://www.nexcess.net/hosting/support/tutorials/ftp/ftpcommindex.php. Now you should be up and running. But don't stop there. Continue to teak, add pages, learn to link to other pages and sites, and frequently add new content. Who knows, you could eventually learn to profit from your creation.

Owner of www.homerunbusinesses.com currently being updated. Started in 2004.Is the authors 3rd site.
|