开发者

How do you read cookie values in ColdFusion that have special characters in the name?

I'm working with ColdFusion trying to read the value stored in a session cookie named "LiSESSION:test-0". The cookie is stored in the "test.com" domain, from code ran from "community.test.com" and I don't have access to the code to change the name. I am reading the value from "test.com" which is how I am able to access the cookie.

For example:

<cfparam name="cookie.LiSESSIONID:test-0" type="string" default="" />开发者_JS百科

.. raises an error saying that ":" is an invalid character ("Invalid parser construct").


Same way you do it with all variables (not just cookies) - by using bracket notation:

Cookie['LiSESSIONID:test-0']
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜