Google Answers Logo
View Question
 
Q: Coldfusion: Dynamically creating cookie from current directory ( No Answer,   1 Comment )
Question  
Subject: Coldfusion: Dynamically creating cookie from current directory
Category: Computers > Programming
Asked by: jgclarke46-ga
List Price: $10.00
Posted: 31 Jan 2005 13:55 PST
Expires: 02 Mar 2005 13:55 PST
Question ID: 466532
In my Coldfusion application, I am automatically creating a directory
for each new user account under a unfied folder. So each new user's
folder is based on the username they choose. For example, if i sign up
w/username "jdoe", my application automatically creates the directory
/www/users/jdoe/.

What I need to do is determine the name of
the directory dynamically and then create a cookie based on the name
of the current directory. For example, when a web browser navigates to
www.mysite.com/users/jdoe/, I want the index.cfm page of that "jdoe"
directory to inherit what the current directory/url is, then populate
the variables of the page with that directory/username.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Coldfusion: Dynamically creating cookie from current directory
From: blorg-ga on 08 Feb 2005 13:26 PST
 
Hi,

I'm presuming you already have the directory creation part done; if
not <CFDIRECTORY action="create"> should handle this for you.

You can determine the current directory by using the CGI.PATH_INFO or
CGI.PATH_TRANSLATED variables. It's not clear to me why you want to
set a cookie explicitly (rather than using the automatic session
tracking) but there is no reason why you can't then stuff this info
into a cookie using <CFCOOKIE> in the normal way.

Check out the docs on Macromedia if you need more syntax info, etc.:

http://livedocs.macromedia.com/coldfusion/6/CFML_Reference/Expressions5.htm

The CF forums on Macromedia.com are also very useful for this sort of stuff.

Otherwise clarify if I haven't understood what you are trying to do.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy