|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Linking to a created file
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. 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 %> -- Show quoteRegards Steven Burn Ur I.T. Mate Group www.it-mate.co.uk Keeping it FREE! <ytoled***@gmail.com> wrote in message news:1147893586.436852.67200@g10g2000cwb.googlegroups.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. > Well, I'm using PerlScript, and also I don't have access to the project
till Tuesday. But I have 2 more questions: Could it be because I don't have premssion to write to the wwwroot\site folder? What permssions does the user which compiles the page have? Thanks ytoled***@gmail.com wrote:
> Well, I'm using PerlScript, and also I don't have access to the project If you have tried writing to the wwwroot\site directory and received an> till Tuesday. > But I have 2 more questions: > Could it be because I don't have premssion to write to the wwwroot\site > folder? > What permssions does the user which compiles the page have? > > Thanks error message about permissions, then you need to ensure that the IUSR_machinename account has write permissions for that folder. -- Mike Brind wrote on 18 mei 2006 in microsoft.public.inetserver.asp.general:
> I received no error, the file simply wasn't written there. Might we know what you are talking about?-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) The reason I can't link to the file I just created is that I can't
create it in the wwwroot\site directory. I open the file for writing, and then write text into it. When I open the site it loads correctly but the file isn't created. Therefore, I receive no error. wrote on 18 mei 2006 in microsoft.public.inetserver.asp.general:
> The reason I can't link to the file I just created is that I can't I still do not know what you are talking about.> create it in the wwwroot\site directory. I open the file for writing, > and then write text into it. When I open the site it loads correctly > but the file isn't created. Therefore, I receive no error. > Please quote what you are replying to. If you want to post a followup via groups.google.com, don't use the "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers. <http://www.safalra.com/special/googlegroupsreply/> -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) |
|||||||||||||||||||||||