推薦:ASP教程:解決ASP腳本運行超時的方法最近在學習服務器知識。有時候遇到asp腳本運行超時的錯誤,真是麻煩。找了相關資料,其中有一些解決方法。 IIS默認的腳本超時時間是90秒這樣的話如果你是上傳軟件或者傳送數據大於90秒的時
ASP實現即時顯示當前頁面瀏覽人數
online.asp文件
| 以下為引用的內容: <!--#include file=dbconn.asp --> <% onlineTimeout=10 ''定義在線活動時間的時間間隔 Function Userip() GetClientIP = Request.ServerVariables(HTTP_X_FORWARDED_FOR) ''''''''''''''''''''''獲得用戶的虛擬IP地址 If GetClientIP = or isnull(GetClientIP) or isempty(GetClientIP) Then GetClientIP = Request.ServerVariables(REMOTE_ADDR) ''''''''''如果未使用代理服務器,就獲得來源的IP地址 End If Userip = GetClientIP End Function sql=select o_id from c_online where o_ip='' &Userip()& '' 在數據庫中查找所獲得的IP地址的id Set rs=conn.execute(sql) If rs.eof and rs.bof Then sql=insert into c_online(o_ip) values('' &Userip()& '') 如果數據庫中沒有就表明是新IP,那麼插入操作 conn.execute(sql) Else sql=update c_online set o_ltime=now() where o_ip='' &Userip()& '' 更數據庫的當前時間 conn.execute(sql) End If sql=delete from c_online where dateadd(''s'',&onlineTimeout*60&,o_ltime) < now() 定義十分鐘刷新 conn.execute(sql) rs.close Set rs=nothing Function allonline() tmprs=conn.execute(Select count(o_id) from c_online) allonline=tmprs(0) set tmprs=nothing end Function %> <%Response.Write document.write(在線&allonline()&人)%> |
分享:解決IIS5 HTTP500內部錯誤一.錯誤表現IIS5的HTTP 500內部服務器錯誤是我們經常碰到的錯誤之一,它的主要錯誤表現就是ASP程序不能瀏覽但HTM靜態網頁不受影響。另外當錯誤發生時,系統事件日誌和安全事件日誌都會有相應