日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

asp入門:asp如何保存數(shù)據(jù)_ASP教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:asp簡單文本計(jì)數(shù)器
% Set fs = CreateObject(Scripting.FileSystemObject) Wfile=server.mappath() cgi-binwww.111cn.cn/asp/asp.html.txt on error resume next Set a = fs.OpenTextFile(Wfile) hits = Clng(a.ReadLine) hits = hits + 1 a.close if error then hits = 1 end if Set a =

下面我們就來看看實(shí)例教程吧.

 先來看看提交的頁面:

<FORM ACTION="saveinfo.asp" METHOD=post>
<!-- Your fields here -->

<INPUT TYPE=submit value="Submit">
</FORM>

下面看看接收數(shù)據(jù)并保存的頁面.

 <%
Set fs = CreateObject("Scripting.FileSystemObject")
Folderpath=server.mappath("") & "/cgi-bin/messages143718" 
Wcounter=Folderpath &"/counter.txt"

Set fs = CreateObject("Scripting.FileSystemObject") 
    if fs.FolderExists(Folderpath) then 
        Set a = fs.OpenTextFile(Wcounter) 
        hits = Clng(a.ReadLine) 
        hits = hits + 1 
        a.close 
    else 
        Set a = fs.CreateFolder(Folderpath) 
        hits=1
    end if

Set a = fs.CreateTextFile(Wcounter,True) 
a.WriteLine(hits) 
a.Close
Set fs=nothing

Set fs = CreateObject("Scripting.FileSystemObject") 
Set a = fs.CreateTextFile(Folderpath & "" & hits & ".txt") 
   For Each x In Request.Form
      a.WriteLine(x &": " & Request.Form(x))
   Next
a.Close 
Set a=nothing 
Set fs=nothing 
%>

分享:asp 在線人數(shù)統(tǒng)計(jì)代碼
只要復(fù)制代碼表中到一個(gè)文本文件并將其保存在主目錄中的網(wǎng)站( / Global.asa中 ) 。 SCRIPT LANGUAGE=VBScript RUNAT=Server Sub Application_OnStart application(activevisitors)=0 End Sub Sub Application_OnEnd End Sub Sub Session_OnStart application.lock ap

來源:模板無憂//所屬分類:ASP教程/更新時(shí)間:2013-04-17
相關(guān)ASP教程