我定义了个Cookie(见下面) 请问: 1)为什么本机测试时计数器number的值始终是1而不是每次+1呢? 2)这个Cookie存在硬盘什么地方了?我打开c:\Documents and Settings-->TYL(当前用户目录)--> Cookies下面怎么看不到呢?而我访问别的网站(如本站)存在我硬盘上的Cookie我就能看到! 我初学的超级菜鸟,遇到的问题真多,麻烦大家了! ------------------------------------------------------------------------------------------------------------ <title>==使用Cookie==</title> < % dim servername dim number servername=request.cookies("customer")("servername") number=request.cookies("customer")("number")
if servername="" then servername=request.servervariables("server_name") response.cookies("customer")("servername")=servername response.cookies("customer")("number")=1 response.cookies("customer").expires=#30-09-2010# response.cookies("customer").domain="http://www.hell.com" else response.cookies("customer")("number")=number+1 end if number=request.cookies("customer")("number") response.write "<br><font color=blue>" response.write "欢迎您<font color=red>"&servername&"</font> 您这是第<font color=red>"&number&"</font>次光临本站!</font><br>"
for each cookie in request.cookies if Request(cookie).haskeys then for each key in request.cookies(cookie) response.write cookie&"("&key&")----"&Request.cookies(cookie)(key)&"<br>" next end if next % > ---------------------------------------------------------------------------------------------------------------------- 还是就是if servername=""这里的""间应不应该有个空格? 我试过了,如果加个空格,计数器number是显示正常了,但输出cookie变量时 servername却不显示了!(即只显示:欢迎您 您这是第X几次光临本站!)为什么? 唉~~~~~~尽是些弱智问题,麻烦大家给看看!