注:a.asp和b.asp是两个不同站点下的文件
============b.asp页面程序代码===============
<%
URL = "http://aa/ifcookie.asp?action=1"
Set Retrieval = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
Retrieval.setOption 2, 13056
Retrieval.open "GET", URL, False, "", ""
Retrieval.send()
ResponseTxt = Retrieval.ResponseText
Set Retrieval = Nothing
Response.Write ResponseTxt
Response.End()
%>
==============ifcookie.asp============
<%
If Request.QueryString("action")="1" Then
If Request.Cookies("username") <> "" Then
Response.Write Request.Cookies("username")
Response.End()
Else
Response.Write "false"
Response.End()
End If
End If
%>
问题补充:如果直接从地址栏中输入http://aa/ifcookie.asp?action=1,Request.Cookies("username")又是有的,真晕,快来救命啊