-
dimact, iflogin, loginurl, loginacturl, logindata, fileurl, ชื่อไฟล์
Act = request.QueryString ("ACT")
ถ้า (act = "ทำ") แล้ว
iflogin = cint (request.querystring ("iflogin")))
loginActUrl = request.form ("loginacturl")
logIndata = request.form ("logIndata")
fileUrl = request.form ("fileUrl")
filename = mid (fileurl, instrrev (fileurl, "/")+1)
extpos = instrrev (ชื่อไฟล์, "?")
ถ้า (extpos> 0) จากนั้น
filename = ซ้าย (ชื่อไฟล์, extpos-1)
endif
ถ้า (iflogin = 1) จากนั้น
callpostthttppage (loginacturl, logindata)
endif
calldownloadfile (fileurl, ชื่อไฟล์)
อื่น
-
<formName = "form1" method = "post" action = "? act = do">
<p> 是否登录:
<inputName = "iflogin" type = "Radio" value = "1">
是
<inputName = "iflogin" type = "Radio" value = "0" ตรวจสอบ> ตรวจสอบ>
否 </p>
<p> 登录提交地址:
<inputName = "loginActUrl" type = "text" size = "50">
</p>
<p>
登录数据: <inputName = "logIndata" type = "text" size = "50">
</p>
<p>
要保存的远程文件 url:
<inputName = "fileUrl" type = "text" size = "50">
</p>
<p>
<inputType = "ส่ง" name = "submit" value = "提交">
<inputType = "รีเซ็ต" name = "subment2" value = "重写">
</p>
</form>
-
endif
FunctionByTestobstr (ร่างกาย, รหัส)
dimobjstream
setObjstream = server.createObject ("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writebody
objstream.position = 0
objstream.type = 2
objstream.charset = รหัส
bytestobstr = objstream.readText
objstream.close
setObjstream = ไม่มีอะไร