Data.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:2k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.Data()
- Set FangWen=Nothing
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Private Sub a()
- c.Write("<form method=""post"" action=""Data.Asp?l=b"">备份到哪个路径(路径必须是有效的,否则会出错)?<br/><input type=""text"" name=""b"" /><br/><input type=""submit"" value=""备份"" /></form>")
- End Sub
- Private Sub b()
- Dim b,FSO
- b=s.Form("b")
- If b="" Then
- Call xkon_Error("备份出错,请输入有效的路径")
- Else
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- FSO.CopyFile Server.Mappath(Server_DB_Path),Server.Mappath(b)
- Set FSO=Nothing
- End If
- c.Writeln("备份成功")
- End Sub
- Private Sub x()
- c.Write("<form method=""post"" action=""Data.Asp?l=d"">将数据恢复到哪个路径的数据库?<br/><input type=""text"" name=""b"" /><br/><input type=""submit"" value=""恢复"" /></form>")
- End Sub
- Private Sub d()
- Dim b,FSO
- b=s.Form("b")
- If b="" Then
- Call xkon_Error("恢复出错")
- Else
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- If FSO.FileExists(Server.Mappath(b)) Then
- FSO.CopyFile Server.Mappath(Server_DB_Path),Server.Mappath(Server_DB_Path&"2")
- FSO.CopyFile Server.Mappath(b),Server.Mappath(Server_DB_Path)
- c.Writeln("恢复数据成功")
- Else
- c.Writeln("找不到该备份文件")
- End If
- Set FSO=Nothing
- End If
- End Sub
- Dim l
- l=s.QueryString("l")
- Call H_Title("备份恢复数据")
- Select Case l
- Case ""
- Call a()
- Case "b"
- Call b()
- Case "c"
- Call x()
- Case "d"
- Call d()
- End Select
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>