Forum > ASP > Generella frågor
Jag undrade vad som är fel i min kod här under:
<%
thetext="Write this text in the file"
Set fs = CreateObject("Scripting.FileSystemObject")
Set wfile = fs.CreateTextFile("iframelinks.txt", False)
wfile.WriteLine "<a href="<%=Request.QueryString("search")%>" target="iframe"><%=Request.QueryString("search2")%></a><br>"
wfile.close
Set wfile=nothing
Set fs=nothing
response.write("Confirmed!")
%>
Får felmeddelandet:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/site/add.asp, line 7
wfile.WriteLine <a href="<%=Request.QueryString("search")
----------------^
Har lite svårt att förklara mig så ställ gärna frågor om ni inte förstår!
Mvh Erik
http://msdn.microsoft.com/en-us/lib...28VS.85%29.aspx
Du verkar ju använda fel konstant (8) om du skall läsa av filerna
|
Constant |
Value |
Description |
|---|---|---|
|
ForReading |
1 |
Open a file for reading only. You can't write to this file. |
|
ForWriting |
2 |
Open a file for writing. |
|
ForAppending |
8 |
Open a file and write to the end of the file. |