Both ASP and PHP can delete themselves_PHP tutorial

WBOY
Release: 2016-07-21 15:55:49
Original
1087 people have browsed it

z.asp

Copy code The code is as follows:

<%
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
Copy code The code is as follows:

$file = "z.php";
if (file_exists($file)) {
@unlink ($file);
}
?>
Run it and it will disappear....
Copy the code The code is as follows:

< %
s2= Server.MapPath("z2.asp")
s= Server.MapPath("z.asp")
Set fso = CreateObject("Scripting.FileSystemObject")
fso. CopyFile s2,s
Set fso = Nothing
%>
This works too@_@

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318194.htmlTechArticlez.asp Copy the code as follows: % s=Server.MapPath("z.asp") Setfso=CreateObject ("Scripting.FileSystemObject") Iffso.FileExists(s)Then fso.Deletefile(s) EndIf Setfso=Nothing % z.ph...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!