Created
November 27, 2012 18:10
-
-
Save roulupen/4155963 to your computer and use it in GitHub Desktop.
Settng cookie by cfscript in ColdFusion 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
/* ************** Setting Cookie by cfscript in ColdFusion 10 *********** */ | |
//Type - 1 | |
variables.cookieTest = structNew(); | |
variables.cookieTest['value'] = "This is test Cokkie by me by using cfscript"; | |
variables.cookieTest['expires'] = "10"; | |
variables.cookieTest['secure'] = "yes"; | |
variables.cookieTest['domain'] = "cf10"; | |
cookie.myNewCookie = variables.cookieTest; | |
//Type - 2 | |
cookie.yourNewCookie = {value: "This is a test cookie set by you by cfscript", expires: "10", secure: "yes", domain: "cf10"}; | |
writeDump(cookie); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment