主题:  关于创建文件的问题

Dreaming

职务:普通成员
等级:1
金币:10.0
发贴:1518
#12004/3/31 12:08:38
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<%@ Import Namespace="system" %>
<%@ Import Namespace="system.io" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script language="vb" runat="server">
sub page_load(sender as object,e as eventargs)
if file.exists(server.MapPath("cr.txt")=false then
     file.create(server.MapPath("cr.txt")
    end if
dim objreader as new streamreader(server.MapPath("cr.txt")
    dim counter as long = objreader.readline()
    objreader.close()
    counter+=1
    dim objwriter as new streamwriter(server.MapPath("cr.txt",false)
    objwriter.writeline(counter)
    objwriter.close()
    label.text=counter
end sub
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form runat="server">
你是第
<asp:Label ID="label" runat="server" />
位访客
</form>
</body>
</html>

提示文件正被某个程序调用???为什么会这样呢?



Dreaming

职务:普通成员
等级:1
金币:10.0
发贴:1518
#22004/3/31 14:29:20
又有一个问题了
("/"&user&"/"&filename))
这错在哪里??
提示:运算符“&”不是为类型“String”和“System.Security.Principal.IPrincipal”定义的
????????????