原因:是由于系统采用server.mappath来读取api的配置文件,而如果论坛绑定到二级目录下,就读不到这个api配置文件了。
解决:打开ks_cls/clubfunction.asp
找到30行左右的代码
Str=str & "<form method=""post"" autocomplete=""off"" id=""loginform"" action=""" & KS.GetDomain & "user/checkuserlogin.asp"">"
If KS.ChkClng(KS.Setting(34))=1 Then Str=str & "<div class=""fastlg1"">" Else Str=str & "<div class=""fastlg"">"
Dim XslDoc:Set XslDoc = KS.InitialObject("Msxml2.FreeThreadedDOMDocument" & MsxmlVersion)
If XslDoc.Load(server.MapPath("../api/api.config")) Then
QQEnable=cbool(XslDoc.documentElement.selectSingleNode("rs:data/z:row").getAttribute("api_qqenable"))
AlipayEnable=cbool(XslDoc.documentElement.selectSingleNode("rs:data/z:row").getAttribute("api_alipayenable"))
If QQEnable Or AlipayEnable Then
Str=Str & "<div class=""l"">"
If QQEnable Then Str=Str & "<a target=""_blank"" href=""" & KS.GetDomain & "api/qq/redirect_to_login.asp""><img src=""" &KS.GetDomain & "api/qq/img/qq_login.png""/></a>"
If AlipayEnable Then Str=Str & "<div style='margin-top:5px'><a target=""_blank"" href=""" & KS.GetDomain & "api/alipay/alipay_auth_authorize.asp""><img src=""" &KS.GetDomain & "api/alipay/alipay_button.gif""/></a></div>"
If AlipayEnable=false Or QQEnable=false Then Str=Str & "<div style=""margin:3px"">只需一步,快速开始</div>"
Str=Str & "</div>"
End If
End If
Set XslDoc=Nothing
将上面的代码改成
Str=str & "<form method=""post"" autocomplete=""off"" id=""loginform"" action=""" & KS.GetDomain & "user/checkuserlogin.asp"">"
If KS.ChkClng(KS.Setting(34))=1 Then Str=str & "<div class=""fastlg1"">" Else Str=str & "<div class=""fastlg"">"
Str=Str & "<div class=""l"">"
Str=Str & "<a target=""_blank"" href=""" & KS.GetDomain & "api/qq/redirect_to_login.asp""><img src=""" &KS.GetDomain & "api/qq/img/qq_login.png""/></a>"
Str=Str & "<div style='margin-top:5px'><a target=""_blank"" href=""" & KS.GetDomain & "api/alipay/alipay_auth_authorize.asp""><img src=""" &KS.GetDomain & "api/alipay/alipay_button.gif""/></a></div>"
Str=Str & "<div style=""margin:3px"">只需一步,快速开始</div>"
Str=Str & "</div>"