论坛: 网站建设 标题: Request与Request.Form的速度测试 复制本贴地址    
作者: ranchuan [ranchuan]    版主   登录


经测试: http://www.*.com/test?name=test
Request("name")的速度是非常快的,当请求的网址是 http://www.*.com/test?时
Request("name")的速度下降了近二十来倍.

下面是测试代码,保存为test.asp

实际中,我们的请求一般仅针对表单的post请求与地址栏的get方法请求(Requestw函数).

<%
function Requestw(str)
    Dim tmp
    tmp = Request.QueryString(str)
    If tmp = "" Then tmp = Request.Form(str)
    Requestw = tmp
end Function

dim DEF_PageExeTime1
DEF_PageExeTime1=Timer * 1000

Dim n,happy
for n = 0 to 50000
    happy = Requestw("name")
Next

Response.Write abs(CDBL(Timer)*1000 - DEF_PageExeTime1)
%>




[此贴被 忽风(ranchuan) 在 06月01日15时22分 编辑过]

地主 发表时间: 06-06-01 15:20

回复: NetFog [q70213526]   版主   登录
不错不错。这我倒是没试过。

B1层 发表时间: 06-06-01 18:07

论坛: 网站建设

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号