浏览模式: 正常浏览 | 列表浏览
分类: ASP Technology | < | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
<%
dim time2
time2=date()
if time2<#2006-5-1# then
response.write"Sorry,你暂不能浏览本网站,本网站的正式开通时间为2006年5月1日0时0分0秒!!!"
%>
<%else%>
你的网页码代码
<% end if %>

只要在首页加上上面的语句就行了。不过这种方法不是很好,只要人地知道有其他页面的地址就可以避过首页的验证了。

一个简单的添加网络音乐的程序

[ 2006-04-21 13:22:49 | 作者: kite ]
首页面

<SCRIPT LANGUAGE="VBSCRIPT">
Sub Checkdata()
If Attend.song1.Value = Empty Then
Window.Alert "“歌手”一定要填写哦..."
Exit Sub
End if
If Attend.song2.Value = Empty Then
Window.Alert "“歌名”一定要填写哦..."
Exit Sub
End if
   If Attend.song3.Value = Empty Then
Window.Alert "“文件URL”一定要填写哦..."
Exit Sub
End if
...

阅读全文

防SQL注入漏动

[ 2006-04-21 13:20:23 | 作者: kite ]
将下面代码做成一个ASP文件,如SQL.asp
在你检查通过的面页加上<!--#include file="SQL.asp"-->就可以了

<%
'--------定义部份------------------
Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr
'自定义需要过滤的字串,用 "枫" 分隔
Fy_In = "\'枫;枫and枫exec枫insert枫select枫delete枫update枫count枫*枫%枫chr枫mid枫master枫truncate枫char枫declare枫or枫'枫\"
'----------------------------------
%>

<%
Fy_Inf = split(Fy_In,"枫")
'--------POST部份------------------
...

阅读全文