Text/Chen Cheng
Have you ever thought about decompressing compressed files online? Haha, sometimes after uploading a compressed package, it is really convenient to use the Asp program to decompress it, especially for webmasters who often update their websites. Since the compression ratio of text files is large, they use compression to upload and then decompress, which saves money compared to direct uploading. A lot of valuable time. Are you ready? Then keep up.
To realize this function, you must first get the decompression core file support of the Rar program (you can download the WinRar software, and then "take out" the WinRar.exe file separately.), and you also need the cmd that comes with the Windows operating system. .exe program (this program is used to execute the WinRar.exe file. It comes with the operating system. The NT kernel operating system can find it in the System32 folder under the operating system installation directory; the Windows 9X operating system can be installed in the operating system. Find it under the System folder in the directory). Then upload them to the same directory. Create an asp file, see the following code:
<%
Dim a,b,Main,Shell,Runing,Runcode,Cmd,comm,fso
Main="d:chenchengrar" `The path after Winrar.exe and cmd.exe after uploading.
a=Server.mappath("rar")&"" 'The storage path after decompressing the rar file.
b=Server.mappath("rarhomepage.rar") 'For the rar file to be decompressed, change homepage.rar to the file that needs to be decompressed.
Set Shell = Server.CreateObject("WScript.Shell")
Running= "d:chenchengrarcmd.exe /c "&Main&"Winrar.exe x -t -o+ -p- " 'Set the command to run the decompression.
Cmd=Run&b&" "&a
Runcode = Shell.Run(Cmd,1, True)
%>