整合动网用户登陆 http://www.hotrich.com/blog/article.asp?id=20
1、实现动网cookies全网通用,登陆、退出也是全网通用。(前提是论坛处于网站的 bbs/ 目录下,相关内容自己根据实际来调整,若 www.aaa.com 这样要取 bbs.aaa.com 的cookies需要判断一下取的路径与名称)
修改三个文件:
①打开inc/Dv_ClsMain.asp
寻找 Response.Cookies(Forum_sn).path=cookiepath
应该共有1个
替换为:
Response.Cookies(Forum_sn).path="/"
② 打开login.asp
寻找 Response.Cookies(Dvbbs.Forum_sn).path=Dvbbs.cookiepath
应该共有3个,其中一个是:Response.Cookies(Dvbbs.Forum_sn).path = Dvbbs.cookiepath(等号两旁有空格)
替换为:
Response.Cookies(Dvbbs.Forum_sn).path="/"
③ 打开logout.asp
寻找 Response.Cookies(Dvbbs.Forum_sn).path=Dvbbs.cookiepath 第26行
应该只有一个
替换为:
Response.Cookies(Dvbbs.Forum_sn).path="/"
于是在任意目录中构建页面读取皆为可能
读取代码:
<!--#include file="bbs/Conn.asp"-->
<!--#include file="bbs/inc/const.asp"-->
<%
response.Write request.Cookies(Dvbbs.Forum_sn)("StatUserID")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("usercookies")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("username")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("password")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("userclass")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("userid")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("userhidden")&"<br>"
%>
修改三个文件:
①打开inc/Dv_ClsMain.asp
寻找 Response.Cookies(Forum_sn).path=cookiepath
应该共有1个
替换为:
Response.Cookies(Forum_sn).path="/"
② 打开login.asp
寻找 Response.Cookies(Dvbbs.Forum_sn).path=Dvbbs.cookiepath
应该共有3个,其中一个是:Response.Cookies(Dvbbs.Forum_sn).path = Dvbbs.cookiepath(等号两旁有空格)
替换为:
Response.Cookies(Dvbbs.Forum_sn).path="/"
③ 打开logout.asp
寻找 Response.Cookies(Dvbbs.Forum_sn).path=Dvbbs.cookiepath 第26行
应该只有一个
替换为:
Response.Cookies(Dvbbs.Forum_sn).path="/"
于是在任意目录中构建页面读取皆为可能
读取代码:
<!--#include file="bbs/Conn.asp"-->
<!--#include file="bbs/inc/const.asp"-->
<%
response.Write request.Cookies(Dvbbs.Forum_sn)("StatUserID")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("usercookies")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("username")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("password")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("userclass")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("userid")&"<br>"
response.Write request.Cookies(Dvbbs.Forum_sn)("userhidden")&"<br>"
%>