Time of Update: 2018-12-08
<%Application.LockIF NOT isArray( Application( "lastTen" ) ) THEN DIM dummy( 10, 3 ) Application( "lastTen" ) = dummy' 建立或者取得最近10個Application數組.END IF lastTen = Application( "lastTen" )Application.UnLockIF lastTen( 9, 0 ) <> "" THENFOR i
Time of Update: 2018-12-08
如何用變數實現群聊和悄悄話?<%if Request.Form("xt")="on" then' 判斷是否悄悄話.Application.Lock' 是悄悄話,繼續往下處理.application(session("username"))=temppos&application(session("username"))' 只有發言人和發言對象才能看到此發言,實現悄悄話.
Time of Update: 2018-12-08
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body bgcolor="#CCCCCC" text="#000000"><h2 align="center">星河影動之查看資料庫結構</h2><p> <%on error resume
Time of Update: 2018-12-08
如何判斷使用者是否非正常離開聊天室? total = application("AllPeople")' 聊天總人數. aryHuman = split(total,";") for i = lbound(aryHuman) to ubound(aryHuman) - 1 if application("user" & i) = "online" then if int(timer) - int(application("TimeBegin" &
Time of Update: 2018-12-08
domainname.asp<form method="POST">請輸入欄位名:<input type="text" name="DomainName" size="20"> <input type="submit" value="提交" name="B1"> <input type="reset" value="重寫" name="B2"></form><%if
Time of Update: 2018-12-08
第一步,建立一個計數器(最簡單的數字計數器,不是圖片式的): <% @language="vbscript" %> <% set fsFilesys=CreateObject("Scripting.FileSystemObject") set myText=fsFilesys.OpenTextFile(Server.MapPath("/count")&"\count.txt")count=myText.ReadLine'
Time of Update: 2018-12-08
<% if Request.QueryString("PageNumber").count > 0 then ' 指定頁號的參數PageNumber.如果指定頁號,則以指定頁號為依據.PageNumber = Request.QueryString("PageNumber")(1)elsePageNumber = 1' 如沒指定頁號,預設為1.end ifRecordNumberPerPage = 10' 每頁顯示10條記錄. set ARecordSet =
Time of Update: 2018-12-08
Function InsertHyperlinks(inText)Dim objRegExp, strBufDim objMatches, objMatchDim Value, ReplaceValue, iStart, iEnd strBuf = "" iStart = 1 iEnd = 1 Set objRegExp = New RegExp objRegExp.Pattern = "\b(www|http|\S+@)\S+\b" ' 判斷URLs和emails.
Time of Update: 2018-12-08
< %@ LANGUAGE="VBscript" % >< % RequestName = Request.Form("Name")RequestLeaveMeAlone = Request.Form("LeaveMeAlone")If RequestName < >"" or RequestLeaveMeAlone < >"" then' 在同一個頁面中檢查表單變數. Response.Cookies("MySiteVisitorName") =
Time of Update: 2018-12-08
不用Global.asa也能實現統計線上人數嗎?<%sessionID = session.SessionIDtimeout = 5' 設定session保持的時間.Conn_String = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("count.mdb")'Conn_String = "activeUser"' 最好設定DSN =
Time of Update: 2018-12-08
<OBJECT ID="agobjOraSession" RUNAT="Server" PROGID="OracleInProcServer.XOraSession" SCOPE="Application"></OBJECT><script LANGUAGE=VBScript RUNAT=Server>Const CONST_FL_NAME = "\GetAttributeCode.ini"Const CONST_FL_FORREADING = 1Const
Time of Update: 2018-12-08
' 設定好global.asa 檔案,如下:<script LANGUAGE="VBScript" RUNAT="Server">Sub Application_OnStart Application("ActiveUsers") = 0 ' 設定計數初始值,可以根據自己的需要哦.End SubSub Session_OnStart Session.Timeout = 20' 根據需要,設定逾時時間. Session("Start") =
Time of Update: 2018-12-08
<%head = "搜尋"SearchString = Request("SearchString")count=0Function UnMapPath( Path ) UnMapPath = Replace(Mid(Path, Len(Server.MapPath("/")) + 1), "\", "/")' 把目前的目錄的實際路徑轉換為虛擬路徑.End FunctionFunction SearchFile( f, s, title ) Set fo =
Time of Update: 2018-12-08
chunfeng.asp' 該頁面可以看到已安排了哪些事情,並在底部連結可按月前後翻動.' 該程式碼封裝含獲得資料連線的函數,如果資料來源一旦有變化,則只有一個位置需要編輯串連資訊(伺服器、使用者和口令). <@ LANGUAGE="VBscript" ENABLESESSIONSTATE = False %> <% ' 表頭包括用來啟動所有頁的檔案,包括全域函數. Option Explicit Response.Buffer = True
Time of Update: 2018-12-08
Function File_GetLastModified( sFile )Dim objFileObj, objFile Set objFileObj = CreateObject("Scripting.FileSystemObject") If sFile = "" Then sFile = Server.MapPath( Request.ServerVariables("script_NAME") ) End If Set objFile =
Time of Update: 2018-12-08
upload.asp <form action=http://<%= Request. ServerVariables(SERVER_NAME)>/wdread.asp method=post> <p>主題: <input type=text name=subject><br> 作者:<input name=author type=text><br> 發布時間: <input
Time of Update: 2018-12-08
security.asp<%bLoggedIn = (len(session("UserName")) > 0) if bRequireLogin then' 要求登入. if Not bLoggedIn then response.redirect "login.asp?comebackto=" & _ request.servervariables("script_name") & "?" & _ ' 如果沒註冊,
Time of Update: 2018-12-08
<%@language="vbscript" %><% set mail= server.CreateObject("cdonts.newmail") mail.subject="恭喜,您在隨風起舞註冊成功,感謝您的參與!" mail.to = mailid mail.from ="song@intels.net" mail.body= "這是隨風起舞寄給您的初始密碼" & vbcrlf
Time of Update: 2018-12-08
<%function WriteToFile(FileName, Contents, Append)on error resume nextif Append = true then iMode = 8else iMode = 2end ifset oFs = server.createobject("Scripting.FileSystemObject")set oTextFile = oFs.OpenTextFile(FileName, iMode,
Time of Update: 2018-12-08
<html><head><title>隨風起舞之檔案查詢</title></head><body><p align="center" > <b><font face="宋體" color="red" size="5">星河影動之檔案查詢系統</font></b></p><hr><form method="POST"