Home >php教程 >php手册 >ASP和PHP都是可以删除自身的

ASP和PHP都是可以删除自身的

WBOY
WBOYOriginal
2016-06-13 12:32:08860browse

z.asp

复制代码 代码如下:


s= Server.MapPath("z.asp") 
Set fso = CreateObject("Scripting.FileSystemObject") 
If fso.FileExists(s) Then 
  fso.Deletefile(s) 
End If 
Set fso = Nothing 
%> 


z.php

复制代码 代码如下:


$file = "z.php"; 
if (file_exists($file)) { 
     @unlink ($file); 

?> 

运行一下,自己没了....

复制代码 代码如下:


s2= Server.MapPath("z2.asp") 
s= Server.MapPath("z.asp") 
Set fso = CreateObject("Scripting.FileSystemObject") 
fso.CopyFile s2,s 
Set fso = Nothing 
%> 

这样也行@_@
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn