It's important to remember that Cold Fusion functions and tags (except
CFlocation) use the host computer's file system for pathing whereas html
tags such as <img> <form> and <a href> use web pathing as defined by the web
server.
If you use expandpath(), <cfmodule>, or <cfinclude> in a .cfm file then the
path you use will be evaluated (using the computer's file system) from the
calling templates physical location.
In this case it sounds like you used expandPath() in a template on your F
drive.  The best way around this is to create a request variable (or
application if you prefer) to hold the physical path to the web root
(c:\inetpub\wwwroot) and have all your cffile tags use this variable
(<cffile action="upload" fileField="upFile"
destination="#request.localWebPath#\folder1\folder2">)

Good Luck!

                                                    
Bryan Love ACP
[EMAIL PROTECTED]
                                                    


-----Original Message-----
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 6:44 AM
To: CF-Talk
Subject: Relative path?


I have a file manager program for users to upload files to the server
however I don't want them to be able to upload files to the root of the file
manager. I put the templates on another drive but now when I try to do
virtual to physical mapping the file manager thinks that the drive it runs
on is the root of the web server. I shared the directory into IIS4 on NT4
and created a relative mapping in CF administrator. When I use
#expandPath("../") it still thinks that the root is E:\filemanager\ instead
of c:\inetpub\wwwroot. Any ideas how to resolve this?

Bryan LaPlante
816-347-8220
[EMAIL PROTECTED]
http://www.netwebapps.com
Web Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to