国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

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

2024-05-04 11:04:33
字體:
供稿:網(wǎng)友

推薦: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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 交城县| 天台县| 南宫市| 三门峡市| 德清县| 石棉县| 什邡市| 福贡县| 绵竹市| 灵武市| 会宁县| 恩平市| 临沧市| 灌南县| 大余县| 年辖:市辖区| 马关县| 平昌县| 台江县| 潼关县| 读书| 故城县| 磐安县| 临汾市| 房山区| 东乌| 聂拉木县| 玛曲县| 墨江| 蓝山县| 大同县| 澄迈县| 疏附县| 宁远县| 常宁市| 陇南市| 沧源| 大荔县| 吉首市| 镇江市| 秦皇岛市|