原來(lái)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)行一下,自己沒(méi)了....
<%
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)行一下,自己沒(méi)了....
復(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)于無(wú)限分級(jí)(ASP+數(shù)據(jù)庫(kù)+JS)的實(shí)現(xiàn)代碼
關(guān)于無(wú)限分級(jí)(ASP+數(shù)據(jù)庫(kù)+JS)的實(shí)現(xiàn)代碼...2007-05-05
ASP 日期的加減運(yùn)算實(shí)現(xiàn)代碼
今天在工作中遇到了一個(gè)問(wèn)題,需要按時(shí)間查詢,可是查詢出來(lái)的結(jié)果顯示的不正確。2009-12-12
asp UTF-8 亂碼問(wèn)題的解決方法小結(jié)
這里整理下asp頁(yè)面下出現(xiàn)亂碼的問(wèn)題,好多ajax讀取的數(shù)據(jù)出現(xiàn)亂碼的解決方法,asp.net,php等語(yǔ)言的亂碼,解決原理都是一樣的。2007-12-12
ASP中經(jīng)常使用的SQL語(yǔ)句與教程說(shuō)明
ASP中經(jīng)常使用的SQL語(yǔ)句與教程說(shuō)明...2007-03-03
巧用FileSystem組件實(shí)現(xiàn)WEB應(yīng)用中的本地特定打印的方法
巧用FileSystem組件實(shí)現(xiàn)WEB應(yīng)用中的本地特定打印的方法...2007-04-04

