A Beginners Guide to Server Side Includes

Written by Kabooli Directory Editors


Continued from page 1

What are we including onrepparttar 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 hadrepparttar 132331 foresight to realize thatrepparttar 132332 navigation menu would change at some point inrepparttar 132333 future. Instead of puttingrepparttar 132334 code forrepparttar 132335 navigation menu into each individual page,repparttar 132336 freelancer placed this code into a separate file. Forrepparttar 132337 sake of example, we can call this file nav-menu.html Our freelancer can now simply place an "include" command that refers torepparttar 132338 nav-menu.html anywhere he/she wants to place this menu. The advantage of this is becomes apparent when our freelancer needs to modifyrepparttar 132339 navigation menu. Just one file needs to be edited, nav-menu.html, and allrepparttar 132340 pages containing "include" refering to this file will automatically update themselves. This time savings isrepparttar 132341 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,repparttar 132342 code contained inrepparttar 132343 file "nav-menu.html" will be inserted into any web page whererepparttar 132344 following code is placed:

Keep in mind that, for technical reasons, server side includes will never be visible when you viewrepparttar 132345 source code for a page in your browser. This is becauserepparttar 132346 include happens onrepparttar 132347 server (before presentingrepparttar 132348 resulting code torepparttar 132349 browser). This makesrepparttar 132350 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 thatrepparttar 132351 need for them only becomes apparent when faced withrepparttar 132352 task of updating tens or hundreds of pages of code. There are many resources onrepparttar 132353 web that will instruct you how use virtual includes, and procedures will vary depending onrepparttar 132354 type of scripting language supported by your server (e.g., ASP, PHP). Hopefully you now understand Server Side Includes and how they can benefitrepparttar 132355 webmaster.


Aboutrepparttar 132356 authors:

This article was written byrepparttar 132357 editors ofrepparttar 132358 Kabooli Internet Directory. This article may be used freely in opt-in publications and websites as long asrepparttar 132359 article not changed in any way and all links inrepparttar 132360 Authors section are active . A courtesy link to any online posting would be greatly appreciated and can be sent torepparttar 132361 editors ofrepparttar 132362 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 withrepparttar 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, andrepparttar 132329 right window showsrepparttar 132330 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.


    <Back to Page 1
 
ImproveHomeLife.com © 2005
Terms of Use