防止数据库下载代码

<!--#include file="Conn.asp" -->
<%
If DBType = 0 Then  'access=0,其他为sql server
    SqlCmd = "Create Table NotDownload(NotDown OLEObject)"
    Conn.Execute(SqlCmd)
    SqlCmd = "Insert into NotDownload(NotDown) values('" &chrB(Asc("<")) & chrB(Asc("%")) & "')"
    Conn.Execute(SqlCmd)
    Conn.Close
    Set Conn = Nothing
    Response.Write "数据库防下载处理完成,请确认您的Access数据库已经改为ASP后缀!"
Else
    SqlCmd = "Create Table NotDownLoad(NotDown image)"
    Conn.Execute(SqlCmd)
    SqlCmd = "Insert NotDownload(NotDown) values(0x3c25)"
    Conn.Execute(SqlCmd)
    Conn.Close
    Set Conn = Nothing
    Response.Write "数据库防下载处理完成,即使您的SQL Server数据库备份为ASP后缀也不会正常执行。"
End If

%>

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据