标题: 请问红色部分的代码是什么意思 [打印本页] 作者: 風雲々無心メ 时间: 2010-1-10 22:32 标题: 请问红色部分的代码是什么意思 '================================================
'函数名:SiteInfo
'作 用:调用网站基本信息
'参 数:
'返回值:定义的所有变量
'================================================
public Language
Language=split(request.servervariables("url"),"/")(UBound(split(request.servervariables("url"),"/"))-1)
public SiteTitle,ComName,Address,SiteUrl,ZipCode,Telephone,Fax,Email,Keywords,Descriptions,IcpNumber,MesViewFlag
public SiteTitleCh,SiteTitleEn,ComNameCh,ComNameEn,AddressCh,AddressEn
sub SiteInfo()
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select top 1 * from NwebCn_Site"
rs.open sql,conn,1,1
SiteTitle=rs("SiteTitle"&Language)
Keywords=rs("Keywords")
Descriptions=rs("Descriptions")
SiteUrl=rs("SiteUrl")
ComName=rs("ComName"&Language)
Address=rs("Address"&Language)
ZipCode=rs("ZipCode")
Telephone=rs("Telephone")
Fax=rs("Fax")
Email=rs("Email")
IcpNumber=rs("IcpNumber")
MesViewFlag=rs("MesViewFlag")
rs.close
set rs=nothing
end sub作者: 往事如烟 时间: 2010-1-10 22:32
public Language
Language=split(request.servervariables("url"),"/")(UBound(split(request.servervariables("url"),"/"))-1)
public SiteTitle,ComName,Address,SiteUrl,ZipCode,Telephone,Fax,Email,Keywords,Descriptions,IcpNumber,MesViewFlag
public SiteTitleCh,SiteTitleEn,ComNameCh,ComNameEn,AddressCh,AddressEn
定义变量public这些变量可能在class语句块内,一般用public定义的都是在class语句块内