为什么ASP代码反翻译软件无法翻译!能否帮我翻译一下??
发布网友
发布时间:2022-04-23 17:31
我来回答
共2个回答
热心网友
时间:2023-01-29 14:21
<%
sub othersize(names)
dim fso,path,ml,mlsize,dx,d,size
set fso=Server.CreateObject("Scripting.FileSystemObject")
path=server.mappath("..\Images")
ml=left(path,(instrrev(path,"\")-1))&"\"&names
On Error Resume Next
set d=fso.getfolder(ml)
If Err Then
err.Clear
Response.Write "<font color=red>提示:没有“"&names&"”目录</font>"
'Response.End()
End If
mlsize=d.size
size=mlsize
dx=size & " Byte"
if size>1024 then
size=(Size/1024)
dx=formatnumber(size,2) & " KB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " GB"
end if
response.write dx
end sub
sub allsize()
dim fso,path,ml,mlsize,dx,d,size
set fso=Server.CreateObject("Scripting.FileSystemObject")
path=server.mappath("../index.asp")
ml=left(path,(instrrev(path,"\")-1))
set d=fso.getfolder(ml)
mlsize=d.size
size=mlsize
dx=size & " Byte"
if size>1024 then
size=(Size/1024)
dx=size & " KB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " GB"
end if
response.write dx
end sub
Function Drawbar(drvpath)
dim fso,drvpathroot,d,size,totalsize,barsize
set fso=Server.CreateObject("Scripting.FileSystemObject")
drvpathroot=server.mappath("../Images")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
On Error Resume Next
drvpath=server.mappath("../"&drvpath)
If Err Then
err.Clear
Response.Write "没有名为“"&drvpath&"”的目录,您可以修改文件以正确显示该目录的使用量。"
Response.End()
End If
set d=fso.getfolder(drvpath)
size=d.size
barsize=cint((size/totalsize)*400)
Drawbar=barsize
End Function
Function FileList(FolderUrl,FileExName)
Set fso=Server.CreateObject("Scripting.FileSystemObject")
On Error Resume Next
Set folder=fso.GetFolder(Server.MapPath(Trim(FolderUrl)))
Set file=folder.Files
FileList=""
For Each FileName in file
If Trim(FileExName)<>"" Then
If InStr(Trim(FileExName),Trim(Mid(FileName.Name,InStr(FileName.Name,".")+1,len(FileName.Name))))>0 Then
FileList=FileList&""&FileName.Name&"|"
End If
Else
FileList=FileList&"<a href='#'>"&FileName.Name&"</a><br>"
End If
Next
Set file=Nothing
Set folder=Nothing
Set fso=Nothing
End Function
%>
热心网友
时间:2023-01-29 15:39
解密后的文档
<%end sub%>
<%
sub othersize(names)
dim fso,path,ml,mlsize,dx,d,size
set fso=Server.CreateObject("Scripting.FileSystemObject")
path=server.mappath("..\Images")
ml=left(path,(instrrev(path,"\")-1))&"\"&names
On Error Resume Next
set d=fso.getfolder(ml)
If Err Then
err.Clear
Response.Write "<font color=red>提示:没有“"&names&"”目录</font>"
'Response.End()
End If
mlsize=d.size
size=mlsize
dx=size & " Byte"
if size>1024 then
size=(Size/1024)
dx=formatnumber(size,2) & " KB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " GB"
end if
response.write dx
end sub
sub allsize()
dim fso,path,ml,mlsize,dx,d,size
set fso=Server.CreateObject("Scripting.FileSystemObject")
path=server.mappath("../index.asp")
ml=left(path,(instrrev(path,"\")-1))
set d=fso.getfolder(ml)
mlsize=d.size
size=mlsize
dx=size & " Byte"
if size>1024 then
size=(Size/1024)
dx=size & " KB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
dx=formatnumber(size,2) & " GB"
end if
response.write dx
end sub
Function Drawbar(drvpath)
dim fso,drvpathroot,d,size,totalsize,barsize
set fso=Server.CreateObject("Scripting.FileSystemObject")
drvpathroot=server.mappath("../Images")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
On Error Resume Next
drvpath=server.mappath("../"&drvpath)
If Err Then
err.Clear
Response.Write "没有名为“"&drvpath&"”的目录,您可以修改文件以正确显示该目录的使用量。"
Response.End()
End If
set d=fso.getfolder(drvpath)
size=d.size
barsize=cint((size/totalsize)*400)
Drawbar=barsize
End Function
Function FileList(FolderUrl,FileExName)
Set fso=Server.CreateObject("Scripting.FileSystemObject")
On Error Resume Next
Set folder=fso.GetFolder(Server.MapPath(Trim(FolderUrl)))
Set file=folder.Files
FileList=""
For Each FileName in file
If Trim(FileExName)<>"" Then
If InStr(Trim(FileExName),Trim(Mid(FileName.Name,InStr(FileName.Name,".")+1,len(FileName.Name))))>0 Then
FileList=FileList&""&FileName.Name&"|"
End If
Else
FileList=FileList&"<a href='#'>"&FileName.Name&"</a><br>"
End If
Next
Set file=Nothing
Set folder=Nothing
Set fso=Nothing
End Function
%>