Helical Alpha Code

ginclude()

Ginclude, standing for global include or general include or generic include, or perhaps even good(er?) include, is a small program which allows you to easily include the same generic files (such as head meta info) in pages across a site, without having to worry about keeping track of relative paths or changing a whole bunch of absolute paths when you migrate servers.

By defining several directories you want globally-accessible in the main script located in your document root, any page on your site can, by including this script (via the document root varialbe) can take advantage of its inclusion functionality. This way, if the absolute path to any of these directories changes, you have only one place to change it, rather than several hundred. If you design a site with ginclude() in mind, migrating is a breeze (well, less of a hurricane than normal, say).

ginclude | Download Source | View Source