NewBie HELP!!

Results 1 to 2 of 2

Thread: NewBie HELP!!

  1. #1
    Join Date
    Dec 1969

    Default NewBie HELP!!

    I really don't get server.mappath. I don't want to get a list of files in the current folder containing the .asp file I am running. I actually want to go to another drive on the server where all these reports are being stored and search through the reports. I have an .asp script that does all the searching and finds all the reports and displays a list of them with hyperlinks to open them----but now I need to look for reports stored in a different drive -----HELP!!!

  2. #2
    Join Date
    Dec 1969

    Default You only need Server.MapPath()... convert the URL of a web page to the file (or directory) location on the web server. For example, if you want to know where on the server your page /mydir/index.asp sits, then use Server.MapPath("/mydir/index.asp") and it will return something like "C:Webrootmydirindex.asp".<BR><BR>If you know the path of the directory or file, then just use that and don&#039;t use MapPath.<BR><BR>Basically, MapPath() is there to avoid hard-coding your web root, so that your ASP code will continue to work even when you move your website to a different host computer which may be set up differently.<BR><BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts