acc数据库备份
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="style.css" type=text/css rel=stylesheet>
<title>数据库备份</title>
</head>
<body text=#000000 leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" bgcolor="#E5E5E5"><br />
<form name="form1" method="POST" action="Admin_Data_Backup.asp?action=back">
<div align="center">
<center>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF" class="border-all">
<tr>
<th>数据库备份</th>
</tr>
<tr class="table_row_1">
<td><div align="center"><font color="#FF0000">数据库名称如果没有变时不需要修改</font></div></td>
</tr>
<tr>
<td height="42"><div align="center"><span style="background-color: #F7FFF7">
数据库路径:
<input type="text" name="currf" size="32" value="../database/Customer.mdb" class="user" />
</span></div></td>
</tr>
<tr>
<th><input name="Action" type="hidden" id="Action" value="Add" />
<input type="submit" name="Submit" value="备份" class="button" />
<input type="reset" name="Submit2" value="重置" class="button" /></th>
</tr>
</table>
</center>
</div>
</form>
<%
if Request("action")="back" then
currf="../Database/"&request.form("currf")
currf=server.mappath(currf)
backf="../Data/数据库备份/"
response.write currf&"<br>"
response.write backf
//end if
backf=server.mappath(backf)
backfy=date&"备份.mdb"
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
objfso.copyfile currf,backf& "\"& backfy
response.write "<script>window.alert(""备份数据库成功!备份文件保存在 '数据库备份' 中!"");window.location.href='Admin_Data_Backup.asp';</script>"
response.end
end if
%>
</body>
</html>