高分求助,关于写文件的权限设置问题

lianyunzxp 北京蓝色风潮科技有限公司 CTO/CIO/技术副总裁/总工程师  2002-07-23 12:30:12
最近俺遇到一个问题,关于写文件的,WebServer是一台机器,要在另一台机器上写文件,(通过共享的方式来访问如\\b23\test)总是提示我说没有写的权限,我搜索了一下论坛,发现大家所说的都是关于权限设置的,我的分区是Fat32的,请问一下如何设置权限,用再发布一个虚尼目录吗?我通过发布一个目录,然后用Server.mappath来做是可以成功的,不过用户说要用\\b23\test来访问,而不是//b23/lsfd/来.
...全文
5 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
meizz 2002-07-23
你可以试试“映射网络驱动器”的方式,将另一台机器上的某个盘映射成自己的一个盘来写。
回复
yonghengdizhen 2002-07-23

iomode参数设置正确了吗?
object.OpenAsTextStream([iomode, [format]])

The OpenAsTextStream method syntax has these parts:

Part Description
object Required. Always the name of a File object.
iomode Optional. Indicates input/output mode. Can be one of three constants: ForReading, ForWriting, or ForAppending.
format Optional. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCI

/////////////////////////////////////////////////////////////
object.OpenTextFile(filename[, iomode[, create[, format]]])

The OpenTextFile method has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
filename Required. String expression that identifies the file to open.
iomode Optional. Indicates input/output mode. Can be one of two constants, either ForReading or ForAppending.
create Optional. Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. The value is True if a new file is created; False if it isn't created. The default is False.
format Optional. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCII.

回复
JavaCoffee 2002-07-23
你的意思是在映射服务器的目录“\\b23\test”后,无法对服务器写数据吗?这可能是对方没有将相关的权限对你放开,你可以联系一下相关人员,设置上权限就可以了,好象不用再通过发布目录这么麻烦的方法吗?
回复
yonghengdizhen 2002-07-23

问题就出在iomode参数

object.OpenTextFile(filename[, iomode[, create[, format]]])

The OpenTextFile method has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
filename Required. String expression that identifies the file to open.
iomode Optional. Indicates input/output mode. Can be one of two constants, either ForReading or ForAppending.
create Optional. Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. The value is True if a new file is created; False if it isn't created. The default is False.
format Optional. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCII.
回复
JavaCoffee 2002-07-23
你的意思是说:在映身对方目录后,还无法在对方的服务器上写数据吗?这可能是对方的相关权限没有对你放开,你可以联系一下相关人员,将权限对你放开即可。这好象不需要通过发布目录这么麻烦吧?

有不明白的,可以短信联系。
回复
yonghengdizhen 2002-07-23

问题就出在iomode参数

object.OpenTextFile(filename[, iomode[, create[, format]]])

The OpenTextFile method has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
filename Required. String expression that identifies the file to open.
iomode Optional. Indicates input/output mode. Can be one of two constants, either ForReading or ForAppending.
create Optional. Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. The value is True if a new file is created; False if it isn't created. The default is False.
format Optional. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCII.
回复
dgz01 2002-07-23
映射驱动器应该是可行的

*****
打工好辛苦
*****
钞票好难赚
*****
编程好伤神
*****
光阴好易混
*****
回复
dgz01 2002-07-23
映射驱动器应该是可行的

*****
打工好辛苦
*****
钞票好难赚
*****
编程好伤神
*****
光阴好易混
*****
回复
lianyunzxp 2002-07-23
\\b23\test是要写文件的目录是其他机器上的一个共享目录,现在就是不知怎么设置这个目录的权限?
回复
发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告