Hi

the Server.Mappath provides the functionality to return the Root folder with
specified extra information (url encoded).

so asume my rootfolder is "c:\temp"
and my file is in the folder "/content/myfile.txt"

you need to call the server.mappath("/content/myfile.txt")
to get the following path: "c:\temp\content\myfile.txt"

so the server.mappath takes a url format string from the root and returns a
windows path with the root included. I hope this all makes sence, since i
don't know how to explain it correct in english.

regards

remie bolte



----- Original Message -----
From: "jake williamson" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 12:20 PM
Subject: server path problem with txt files


>
>
> hi lads and lass's,
>
> got a weird one here.....
>
> i've been deving a site that gets text from text files and displays it
> in files. locally my server path is:
>
> Set objTextFile =
> objFSO.OpenTextFile("c:\inetpub\wwwroot\28design.co.uk\apian\txt\home.txt"
> )
>
> which is cool. i've contacted our hosting company and they have supplied
> us with the server path for our site. so the code looks like:
>
> Set objTextFile =
>
objFSO.OpenTextFile("d:\inetpub\wwwroot\28design.co.uk\htdocs\apian\txt\home
.
> txt")
>
> but when i test the page it gives me the error:
>
> > Server.MapPath() error 'ASP 0172 : 80004005'
> >
> > Invalid Path
> >
> > /apian/home.asp, line 69
> >
> > The Path parameter for the MapPath method must be a virtual path. A
> > physical path was used.
>
> really confused about this one - how do i change it about????!!
>
> any suggestions would be grand!
>
> cheers,
>
> jake
>
>
> ---
> You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%



---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to