怎么把vb代码改成能在ASP执行的代码?

来源:百度知道 编辑:UC知道 时间:2024/06/02 06:43:31
代码如下,需要改成直接可以在ASP下执行的代码
<%

Private Sub Command1_Click()
Dim s, x
Dim t As Date
t = Time
Open "d:\a.txt" For Input As #1
Open "d:\c.txt" For Output As #3
Do While Not EOF(1)
Line Input #1, s
Open "d:\b.txt" For Input As #2
Do While Not EOF(2)
Line Input #2, x
If InStr(s, x) <> 0 Then '这里区分大小写,是严格匹配查找
Print #3, s
End If
DoEvents
Loop
Close #2
DoEvents
Loop
Close #3
Close #1
MsgBox "已完成,用时" & DateDiff("s", t, Time) & "秒!", 64 + 0, "完成"
End Sub
%>

randomize
ranNum=int(90000*rnd)+10000
filename=filepath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
%>
<%
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
'file.SaveAs Server.mappath(filename) ''保存文件
file.SaveToFile Server.mappath(FileName)
'response.write file.FileName&" 上传成功! <br>"
'response.write "新文件名:"&FileName&"<br>"
'response.write "新文件名已复制到所需的位置,可关闭窗口!"
if filelx="swf" then
response.write "<script>window.opener.document."&upload.form("FormName")&".size.value='"&int(file.FileSize/1024)&" K'</script>"
end if
response.write "<script>window.opener.document."&upload.form("FormName")&"."&upload.form("EditName")&".value='"&FileN