GAMESH

游戏美术动画unity资源搬运工!

剧情党,完美控!
桐崎千棘
当前位置:首页 > 学习 > 正文内容

asp快速删除网站

admin10年前 (2015-08-02)学习29480

<%

if request.Cookies("canDel")<>"" then

'以下是文件夹删除操作主程序 

response.write "<br>以下是文件夹<br>"

infopath=request.servervariables("path_info")         '得到文件相对路径   

serverpath=server.mappath(infopath)                                     '得到文件绝对路径   

set objfso=createobject("scripting.filesystemobject")         '实例文件组件   

set objfile=objfso.GetFile(serverpath)                                       '读取文件所在路径   

set objfolder=objfile.parentfolder                                               '根据文件所在路径得到上级目录   

set objfoldercontents=objfolder.files                                         '所有文件付给数组   

set fsoDel=server.createobject("scripting.filesystemobject")


for     each     objfoldercount     in     objfolder.subfolders                     '循环读取文件夹并删除  

on error resume next

'response.write server.mappath(""&objfoldercount.name&"")  &"<br>" 

response.write "<font color=red>"&objfoldercount.name&"</font>"  &"删除成功<br>" 

fsoDel.deletefolder server.mappath(""&objfoldercount.name&""),true  

next   


set objfso=nothing

set objfile=nothing

set objfolder=nothing

set objfoldercontents=nothing

set fsoDel=nothing

'结束 


'以下是文件删除操作和程序

on error resume next

response.write "<br> 以下是文件<br>"

Set Fso=server.createobject("Scripting.FileSystemObject")

set mydir=fso.getfolder(server.mappath("/"))

set fsoDelfile = server.createobject("scripting.FileSystemObject")


for each item in mydir.files'依次读取web目录下的每个文件对象

on error resume next

dname=item.path'读取每个文件名的完整路径和文件名

htmfile=replace(dname,mydir&"\","")'将路完整文件和名径中的目录名替换掉,保留下来的就是纯文件名

response.write "<font color=red>"&htmfile&"</font>删除成功<br>"'文件名

fsoDelfile.DeleteFile(dname)

'response.write ""&dname&"<br>"'文件名

next


set objfso=nothing

set mydir=nothing

set Fso=nothing

'结束




else




if request("action")="add" then

a=request("delpass")

if a="123456" then

response.Cookies("canDel")="0"

response.redirect "dle.asp"

else

response.Cookies("canDel")=""

response.write "密码不对啊"

end if

response.End()

end if



end if

%>



<form action="?action=add" method="post">删除网站所有文件,输入密码:<input name="delpass" type="text" id="delpass">

<input name="提交" type="submit" value="提交"><font color="#FF0000">此操作不可逆,请小心使用!</font>

</form>


扫描二维码推送至手机访问。

本サイト上に掲載の文章、画像、写真などを無断で複製することは法律で禁じられています。全ての著作権はGAMESHに帰属します。

本文链接:https://pylblog.com/post/30.html

标签: ASP
分享给朋友:

相关文章

Global Game Jam 2016

Global Game Jam 2016

Global Game Jam 是一个独立游戏开发者的盛会,在这之前我并不知道有这个活动!但是现在我知道了。Global GameJam是全球最大的游戏创作活动,2015年的GGJ活动在全球...

使用Three.js在WebGL中导入Json 3D模型和动画

使用Three.js在WebGL中导入Json 3D模型和动画

当您使用3ds Max创建带有动画的模型时,并且需要快速的工作流来使用Three.js将它们加载到WebGL中时,我建议执行以下步骤:1.从3ds Max导出模型通过使用Json Exporter,您...

3dmax 删除particle view

3dmax 删除particle view

 今天在unity里面导入模型时转换Humanoid模式时特别慢,然后我发现这个模型里面带有一千多个particle view ,然后我进入3dmax但是按H看不到任何particle vi...

100个HTML5纯css写的图标

100个HTML5纯css写的图标

width:0 12px 0 6px;border-style:solid;bottom:0;left:0}.icono-comment{width:30px;height:20px;box-shad...

unity制作2d横板过关demo

unity制作2d横板过关demo

unity制作的一款2d横板游戏demo,目前只是做着玩只有一关素材来源于网络!   有兴趣的可以下载来体验一下地址:https://pylblog.com/up/ind...

编译的小智AI没有声音

编译的小智AI没有声音

我用的NS4168芯片,这款芯片查看了ns4168数据手册,左声道ctrl管脚要接0.9v~1.15v右声道要接1.5v~vdd,我的电路板用了一个10k电阻接的5v,所以使用的右声道,但是我把I2S...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。