troubleshooting Question

Write to a file.

Avatar of CWS (haripriya)
CWS (haripriya)Flag for India asked on
Web Languages and StandardsASPAdobe Dreamweaver
8 Comments1 Solution198 ViewsLast Modified:
<%
sImg = "#FFFFFF"
sVid = "#FFFFFF"
%>

I just want to right the above code in a .INC file. I am using the following code.

<%
dim fs,fname, strPath, a, b, cl
a= """#FFFFFF"""
b= """#000000"""
set fs=Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath("./cat.inc")
set fname=fs.CreateTextFile(strPath)
fname.WriteLine("<%")
fname.WriteLine("sImg = " & a )
fname.WriteLine("sVid = " & b )
fname.WriteLine("%>")

fname.Close
set fname=nothing
set fs=nothing
%>

It keeps giving error:
---------------------------------
Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/test.asp, line 19

fname.WriteLine("
-------------------------------------
line 19 is this:
fname.WriteLine("%>")
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros