텍스트 파일을 읽고 텍스트 영역에 텍스트 내용을 넣는 비슷한 작업을하고있었습니다. 사용자는 거기에 있던 내용을 업데이트하고 "업데이트"를 클릭하면 텍스트 영역에서 모든 새 정보를 가져옵니다. 당신이하려고하는 것이지 모르지만 내 코드는 아래에 있습니다. 희망이 도움이됩니다.
업데이트 페이지 :
<!-- Opens/Creates the file Notifications.txt-->
<%
Set cs=Server.CreateObject("Scripting.FileSystemObject")
Set c=cs.OpenTextFile(Server.MapPath("Notifications.txt"), 1)
theGoods = (c.ReadAll)
c.Close
Set f=Nothing
Set fs=Nothing
%>
<!-- /End the file Notifications.txt-->
<form method="GET" action="overwrite.asp">
<textarea rows="10" cols="100" name="Updates" id="Notifications" required><%= theGoods%></textarea>
<br /><br />
<input type="submit" name="submit" value="Update" id="submit" onclick="toggle_visibility('Update');"/>
<input type="button" value="Bold Tags" id="bold" />
<input type="button" value="Italic Tags" id="italic" />
</form>
실제 처리/덮어 쓰기 페이지 : 나에게 다시 얻기를위한
<!-- Opens/Creates the file Notifications.txt-->
<%
Dim idea
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile(Server.MapPath("Notifications.txt"), 2, true)
idea= Request.QueryString("Updates")
f.WriteLine(idea)
f.Close
set f=nothing
set fs=nothing
%>
감사합니다. 나는 잘못 입력했다. 나는 당신이 말하고 있었던 것에서 코드를 두 번 체크했으나 여전히 운이 없다. – user3206555