Give this a try;
<%
'// incFunctions.asp
'// Ensure used vars are declared
Option Explicit
'// Const for the FileSystemObject
Const c_Read = 1 '// Read a file
'// Function: ReadFile
'// Purpose: Read the content of a file
'//
'// Usage:
'//
'// Dim strData: strData = ReadFile("..\private\myfile.txt")
Function ReadFile(sFile)
Dim objFSO, objFile '// Declare used vars
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(Server.MapPath(sFile), c_Read)
ReadFile = objFile.ReadAll()
Set objFSO = Nothing '// ALWAYS cleanup
End Function
%>
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
<yt*******@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
Hi,
I'm using PerlScript in my ASP page and I have the following problem:
Each time the page is refreshed a CSV file is created. I want this file
to be available for download. The problem is I can't create the file in
the "wwwroot\site" dir, so I can't link to it. I can however create
anywhere else on the server.
Thanks in advanced.