帮帮看看下面的代码!!本地IIS运行正常,传上虚拟主机上就说有错误。。。
计数器代码如下:
=============================
<%
function g_count(countfile)
set objfso=server.createobject("scripting.filesystemobject")
set objts=objfso.opentextfile(server.mappath(countfile),1,true)
if not objts.atendofstream then
count1=clng(objts.readline)
end if
if session("counter")="" THEN
count1=count1+1
session("counter")=count1
end if
objts.close
set objts=objfso.opentextfile(server.mappath(countfile),2,true)
objts.write cstr(count1)
objts.close
for i=1 to len(count1)
g_count=g_count&"<img src=images/count/"&mid(count1,i,1)&".gif>"
next
end function
%>
您是第<%=g_count("count.txt")%>访客
==========================
错误如下
Microsoft VBScript 运行时错误 错误 '800a0046'
没有权限
/index.asp,行12