Asp操作Cookies(设置[赋值]、读取、删除[设置过期时间])

发布:2011-07-30 11:38   点击1089次   评论:0

<%
''Session("s_main") = Timer()&"@s_main"
Response.Write "<br>1."&Session("s_main")
Response.Write "<br>2."&Session("s_inn")

''Response.Cookies("cGroup1")("c_main") = Timer()&"@c_main" ''赋值
Response.Write "<br>3."&Request.Cookies("cGroup1")("c_main")
Response.Write "<br>4."&Request.Cookies("cGroup1")("c_inn")
%>
<br />
<iframe src="/app2/go.asp"></iframe>
<br />
Asp操作Cookies(设置[赋值]、读取、删除[设置过期时间])<br />
Response.Cookies(&quot;letwego&quot;)(&quot;visiter&quot;)=&quot;84ww&quot; ''赋值<br />
Response.Cookies(&quot;letwego&quot;).Expires= (now()+7) ''设置过期时间(7天)<br />
userName=Request.Cookies(&quot;letwego&quot;)(&quot;visiter&quot;) ''取Cookies<br />
Response.Cookies(&quot;letwego&quot;).Expires= (now()-1) ''删除Cookies,设置过期时间(-1天)

关于 GitHub 导航 部门 反馈

提示:`/home.php`入口数据仅为演示功能,不构成任何交易凭证,也不承担相关风险和责任!

Copyright © 2011-2018 xxxxx.com All rights reserved.

Run:3.867/30.367(ms); 7(sql)/2.877(MB); comm:news/detail; Upd:2024-11-15 18:15:45