framar studios
 REAL SOLUTIONS FOR REAL BUSINESS
Search Articles:
Keywords:

Index

Home
Contact
Authors

Sections

About...

Explorations in Web Development

Freeware

Portfolio: Frank's Work

Tutorials: Solutions for techs


Login
User Name:
Password:

cf_GetPath

Dec 09, 2001 By Frank Marion

PURPOSE of this document:

1) It will allow you to set the account's web root path to a variable.

-> C:Inetpubwwwroot (Windows)
-> /usr/local/apache/myaccount/ (*nix)

2) It will allow you to set an explicit path from the rootfolder in which this document resides. Useful if you want to create relative paths to files that are to be included into another in a different directory. Works on both win and *nix.

USAGE:


	OR
<- Path to this document [Required]
	OutputType="Path|Root"	<- Display the account root, or an explicit path? 
	ShowDebug="Yes|No">	<- Display this document's debugging information?

ATTRIBUTES:

	OutputType:	Optional.	Default: Path
	ShowDebug:	Optional.	Defaults: No

OUTPUT:
You may then refer to the variable as ThePath as such:

	

LICENSE:

This tag is freeware (NOT public domain). I retain all rights. You may make unlimited use of this tag for any purpose, personal or as part of a commercial work (not including re-distribution),providing that these comments are kept intact and that any changes you make are clearly documented in the comments, in your own name should you choose to re-transmit it with modification.

In other words: Use this freely, share it with your friends, use it in your commercial projects, but you may NOT re-distribute tag for a fee. It's free, give me credit of authorship and don't sell it as your own, or in a collection of some sort. If you aren't clear about this, or wish to use it in a different manner, I welcome your inquiries.

As usual, no warranties or guarantees of usefulness or even fitness for any purpose are made. This script is written as well as I know how to, and in using this, you agree to take complete responsibility for anything that may go wrong.

If you use it, please send me an email, just to that I can know my work is useful to others. Feel free to contact me with questions or suggestions. I especially welcome letters from developers who might have constructive feedback or alternate approaches. Frank Marion, [email protected]


File Download
Title cf_GetPath
Description This document is archived as a .zip file.
Size 4 k
Frank Marion, Web Application Developer
Email: [email protected]
Web: http://www.framarstudios.com

Frank has over ten years of experience in the field of internet development. His skills range the gamut of web developement fields, and is known for the quality of his work.
Tip
Finding your path.
When including one file into another, relative paths often break. cf_GetPath will return a relative path, based on the location of the included file, instead of the parent file. Check it out! It's free!

[All Tips]