📄 backup.asp
字号:
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<!-- #include file="../inc/md5.asp" -->
<html>
<head>
<title><%=dianming%> - 数据库备份</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
</HEAD>
<BODY>
<%
if fla60="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%
response.end
end if
%>
<%if request("hid1")="" then%>
<form name="form1" method="post">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 数据备份</td>
<td align="right"> </td>
</tr>
</table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr>
<td height="30" colspan="2" align="center" class="category">你的空间只有支持fso才可以进行如下操作,否则你只能手动备份</td>
</tr>
<tr class="a3">
<td width="25%" height="30" align="right">当前数据库路径:</td>
<td width="75%" class="category">
<input type="text" name="currf" size="30" value="data/#yida_jxc31#.dat" readonly="true">
</td>
</tr>
<tr>
<td height="30" align="right">备份数据目录:</td>
<td class="category">
<input type="text" name="backf" size="30" value="backup" readonly="true">
</td>
</tr>
<tr class="a3">
<td height="30" align="right">备份数据库名称:</td>
<td class="category">
<input type="text" name="backfy" size="30" value="#yida_jxc31#_bak.dat" readonly="true">
</td>
</tr>
<tr>
<td align="center" colspan="2" class="category">
<input type="submit" value=" 确认备份 " class="button">
<input type="hidden" name="hid1" value="ok"></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</form>
<%
else
currf="../"&request.form("currf")
currf=server.mappath(currf)
backf="../"&request.form("backf")
backf=server.mappath(backf)
backfy=request.form("#yida_jxc31#_bak.dat")
on error resume next
set objfso = Server.CreateObject("Scripting.FileSystemObject")
if err then
err.clear
response.write "<script>alert(""不能建立fso对象,请确保你的空间支持fso:!"");history.back();</script>"
response.end
end if
if objfso.Folderexists(backf) then
else
set fy=objfso.CreateFolder(backf)
end if
if objfso.fileexists(currf) then
Else
response.write "<script>alert(""找不到您所需要备份的文件"");history.back();</script>"
response.end
End if
objfso.copyfile currf,backf& "\"& backfy
response.write "<script>alert(""备份数据库成功"");history.back();</script>"
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -