范文 |
其实想实现这种功能很简单,首先要上传一个rar的解压程序,就是rar自己的解压程序,只需要它的核心 程序rar.exe这个文件就可以了。然后就要上传一个执行rar.exe的程序 cmd.exe 这个是windows里的程序(不必我在多说了吧)。最后就开始执行这些程序了。看一下下面的代码 <% dim ylj,ywj,mlpath,shell,rarcomm,retcode,cmd,comm,fso mlpath=e:pagemian '存放rar.exe和cmd.exe的路径 ylj=server.mappath(mian)& '解压文件后所放的路径 ywj=server.mappath(mianapathy.rar) '要解压的rar文件 set shell = server.createobject(wscript.shell) rarcomm= e:pagemiancmd.exe /c &mlpath&rar.exe x -t -o+ -p- cmd=rarcomm&ywj& &ylj retcode = shell.run(cmd,1, true) %> 就是用server.createobject(wscript.shell)来执行cmd.exe来运行rar.exe文件来解压rar文件的。 以前不知道是否有前辈们发表过这些文章,但那位兄弟有兴趣的可以以用这种方法来实现诸多类似与这样的程序,希望你们可以找到一些更好的方法。 |