最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
大灰狼的ASP工具箱――防盗链、判断星期几
时间:2022-07-02 23:42:04 编辑:袖梨 来源:一聚教程网
防盗链
<%
http=Request.ServerVariables("HTTP_REFERER")
http2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(http,8,len(http2))<>http2 then
response.write "本站禁止从外部站点下载!"
else
response.redirect "download.doc" 'download.doc为下载文件名
end if
%>
-------------------------------------------------------
判断星期几
<%
yue=month(date())
nian=year(date())
thismon=nian&"-"&yue&"-1"
nextmon=dateadd("m",1,thismon)
tiancount=datediff("d",thismon,nextmon) '本月的天数
wek= Weekday(date())
select case wek
case 1
response.write "周日"
case 2
response.write "周一"
case 3
response.write "周二"
case 4
response.write "周三"
case 5
response.write "周四"
case 6
response.write "周五"
case 7
response.write "周六"
end select
yue=month(date())
nian=year(date())
thismon=nian&"-"&yue&"-1"
nextmon=dateadd("m",1,thismon)
tiancount=datediff("d",thismon,nextmon) '本月的天数
dim wek,wekday
wek= Weekday(date())
select case wek
case 1
wekday= "周日"
case 2
wekday= "周一"
case 3
wekday= "周二"
case 4
wekday= "周三"
case 5
wekday= "周四"
case 6
wekday= "周五"
case 7
wekday= "周六"
end select
'response.write "本月共"&tiancount&"天,今天是"&wekday&"
%>
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21