On 3/15/01, Jon Hall penned:
>Does anyone know of a work around for cfinclude in a shared hosting
>environment? Maybe a few guidelines?
>Because, if there is a way to limit a top root directory for cfinclude, it
>is not obvious to me...

The easiest way is to not make the path contain a variable.

<cfinclude template="path/to/document">

as opposed to:

<cfset pathtodocument = somevariable>

<cfinclude template="#pathtodocument#">

If it must be done this way, you could do:

<cfinclude template="#replace(pathtodocument, "../", "", "ALL")#">

Or do a cfif pathtodocument contains "../" and cflocation them to 
some porn site somwhere. :)

Just make sure you make all your included documents at or below the 
template that's calling the include so you never need to enter ../ in 
your variable.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to