原來ASP和PHP都是可以刪除自身的
更新時(shí)間:2008年06月13日 22:49:05 作者:
asp和php刪除自身的代碼
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
<?php
$file = "z.php";
if (file_exists($file)) {
@unlink ($file);
}
?>
運(yùn)行一下,自己沒了....
<%
s2= Server.MapPath("z2.asp")
s= Server.MapPath("z.asp")
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile s2,s
Set fso = Nothing
%>
這樣也行@_@
復(fù)制代碼 代碼如下:
<%
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
復(fù)制代碼 代碼如下:
<?php
$file = "z.php";
if (file_exists($file)) {
@unlink ($file);
}
?>
運(yùn)行一下,自己沒了....
復(fù)制代碼 代碼如下:
<%
s2= Server.MapPath("z2.asp")
s= Server.MapPath("z.asp")
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile s2,s
Set fso = Nothing
%>
這樣也行@_@
相關(guān)文章
使用ASP獲得服務(wù)器網(wǎng)卡的MAC地址信息
使用ASP獲得服務(wù)器網(wǎng)卡的MAC地址信息...2007-01-01關(guān)于無限分級(jí)(ASP+數(shù)據(jù)庫(kù)+JS)的實(shí)現(xiàn)代碼
關(guān)于無限分級(jí)(ASP+數(shù)據(jù)庫(kù)+JS)的實(shí)現(xiàn)代碼...2007-05-05ASP 日期的加減運(yùn)算實(shí)現(xiàn)代碼
今天在工作中遇到了一個(gè)問題,需要按時(shí)間查詢,可是查詢出來的結(jié)果顯示的不正確。2009-12-12巧用FileSystem組件實(shí)現(xiàn)WEB應(yīng)用中的本地特定打印的方法
巧用FileSystem組件實(shí)現(xiàn)WEB應(yīng)用中的本地特定打印的方法...2007-04-04