我找了个计数器,是使用文本记录数据的,我的免费空间不支持对文本的存取,请问各位怎么把它改写成把数据记录在一个名字为counter.mdb的数据库的count表格的countpage字段里面?先谢谢了!代码如下:
<%@ LANGUAGE = VBScript %>
<%option explicit %>
<% response.buffer=true %>
<%
dim fs,a,readline
Session.Timeout=1
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(Server.Mappath("count.txt"))
readline = Clng(a.ReadLine)
if Session("readline") = "" then
Session("readline") = readline
readline = readline + 1
a.close
Set a = fs.CreateTextFile(Server.Mappath("count.txt"), True)
a.WriteLine(readline)
end if
a.Close
%>
<%
dim length,i,imgPath
imgPath=""
Length = Len(readline)
for i=1 to 6-Length
imgPath = imgPath & "

"
next
for i=1 to Length
imgPath= imgPath & "

"
next
Response.ContentType = "application/x-javascript"
'Response.Write ""
%>
TextText