簡體   English   中英

vbscript FileSystemObject 在本地工作但不在現場

[英]vbscript FileSystemObject works locally but not live

誰能告訴我這個(應該是什么)簡單的 VBscript 是怎么回事。 它在本地工作,但只要我在網上嘗試,它就會彈出如下錯誤! 一切都保存在根!

任何想法表示贊賞! 我要開始拔頭發了!

<%
'path = filesys.GetAbsolutePathName("c:/inetpub/wwwroot/website/somefile.txt")

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.OpenTextFile (server.MapPath("/somefile.txt"), 8, True) 

filetxt.WriteLine("Last Update: ") & Now
filetxt.Close
%>

我不斷收到以下錯誤...

Microsoft VBScript 運行時錯誤“800a0046”

沒有權限

/locations.asp,第 6 行

錯誤描述清楚。 您需要對所需目錄的寫訪問權限。 如果您是托管客戶,則應在控制面板中授予對 IUSR 帳戶的寫入權限。 通常,用戶名類似於IUSR_sitename.com 因此,如果這一切都變得太混亂,也許您應該在提供商的幫助台中開一張票。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM