string problem

J

Jamie Fryatt

quick one please guys

this wont work can you hlep me with it please, what extra bits do i have to
add in to make it work?

thanks

<%
dim fs,f
dim siteid
dim year
dim country
strsiteid = request.querystring("siteid")
stryear = request.querystring("year")
strcountry = request.querystring("country")
set fs=Server.CreateObject("Scripting.FileSystemObject")
set
f=fs.CreateFolder("C:\www\images\<%=strsiteid%>\<%=stryear%>\<%=strcountry%>
")
set f=nothing
set fs=nothing
%>

Microsoft VBScript compilation error '800a0409'
Unterminated string constant

/v4/admin/contestants_create.asp, line 27

set f=fs.CreateFolder("C:\iFtpSvc\NS4\users\world\www\images\<%=strsiteid
-------------------------------------------------------------------------^
 
R

Ray at

You use <% %> when you're writing ASP code interlaced with HTML. Like:

<table>
<tr>
<td>Your name is <%=yourNameVariable%></td>
</tr>
</table>

When you're writing ASP code already within the <% %> blocks, you'd just
want to concatenate your strings and variables like:

<%
sFolderToCreate = "C:\www\images\" & strsiteid & "\" & stryear & "\" &
strcountry
SET f=fs.CreateFolder(sFolderToCreate)
%>

Note the usage of SET also, for object variables.

Ray at work
 
J

Jamie Fryatt

thanks for your help.


Ray at said:
You use <% %> when you're writing ASP code interlaced with HTML. Like:

<table>
<tr>
<td>Your name is <%=yourNameVariable%></td>
</tr>
</table>

When you're writing ASP code already within the <% %> blocks, you'd just
want to concatenate your strings and variables like:

<%
sFolderToCreate = "C:\www\images\" & strsiteid & "\" & stryear & "\" &
strcountry
SET f=fs.CreateFolder(sFolderToCreate)
%>

Note the usage of SET also, for object variables.

Ray at work




f=fs.CreateFolder("C:\iFtpSvc\NS4\users\world\www\images\<%=strsiteid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top