1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

计算ASP页面执行时间

Discussion in '后端开发' started by 小叶, Oct 2, 2005.

  1. 小叶

    小叶 New Member

    Joined:
    Sep 4, 2005
    Messages:
    17,941
    Likes Received:
    33
    页面执行时间:就是从这页的开始执行一直到这页执行完毕所用的时间。

    许多网站的首页的页尾都会显示一个页面执行时间,下面说说如何实现:

    首先在一个网页的开头定义一个变量:

    dim startime

    startime=timer()

    在显示页面执行时间的地方,这个地方应该是页尾的地方:

    dim endtime

    endtime=timer()

     
  2. laogui

    laogui Administrator
    Staff Member

    Joined:
    Aug 30, 2005
    Messages:
    15,216
    Likes Received:
    35
    asp这么简单就实现这个功能了?
     
  3. Tameway

    Tameway New Member

    Joined:
    Sep 6, 2005
    Messages:
    1,286
    Likes Received:
    8
    PHP应该也是如此
     
  4. 小叶

    小叶 New Member

    Joined:
    Sep 4, 2005
    Messages:
    17,941
    Likes Received:
    33
    那你还想怎么样?:p