Pack the file into Xml file package, with an ASP tool that unpacks!
Pack all the website source code into an Xml file, generate the updata.xml file, and upload the xml file to the space
Then release all the files through the install.asp file.
It has the same function as the automatic installation package of z-blog.
The code was written by a brother who was out of date, but the code seemed to be incorrect. This was modified by me by reference and it can run normally! ~~
This code can be applied to the automatic upgrade service of the asp program. How to implement it specifically, welcome to discuss! ~~
Let’s discuss it in the following post! ~~~
There is no need to set the packaged directory version, you need to set the difference between the packaged directory version:
You don’t need to set the packaged directory version, just put it in the directory you need to package to execute.
You need to set the package directory version, and you must specify the path to package (modify in the program). If you do not specify it, you cannot package it.
No need to set the directory - package the file
The code copy is as follows:
<%@LANGUAGE="VBSCRIPT"CODEPAGE="65001"%>
<%OptionExplicit%>
<%OnErrorResumeNext%>
<%Response.Charset="UTF-8"%>
<%Server.ScriptTimeout=99999999%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<title>File Packaging Program</title>
</head>
<body>
<%
DimZipPathDir, ZipPathFile, ZipFileExt
Dimstartime, endtime
'Change the path to the folder to be packaged here
ZipPathDir=Left(Request.ServerVariables("PATH_TRANSLATED"),InStrRev(Request.ServerVariables("PATH_TRANSLATED"),"/"))'
'The generated xml file
ZipPathFile="update.xml"
'Not packaged file extension
ZipFileExt="db;bak"
ifright(ZipPathDir,1)<>"/"thenZipPathDir=ZipPathDir&"/"
'Start packing
CreateXml(ZipPathFile)
'Travel through all files and folders in the directory
subLoadData(DirPath)
dimXmlDoc
dimfso'fso object
dimobjFolder' folder object
dimobjSubFolders' subfolder collection