Help Me Please!!

Results 1 to 8 of 8

Thread: Help Me Please!!

  1. #1
    New ASP Guest

    Default Help Me Please!!

    I am using a free ASP host, and want the visitor to write their comments to *Hard Drive* of my host.<BR>I use:<BR><BR>set fs = CreateObject("Scripting.FileSystemObject")<BR>set a = fs.CreateTextFile("comment.txt", True)<BR><BR>But I don&#039t know the Absolute Physical Path of the host.<BR>How can I know that? Help me please!!!<BR><BR>Thanks!!!!!!!!<BR>

  2. #2
    BalletChick Guest

    Default RE: Help Me Please!!

    You might want to look at server.mappath. Does that help?

  3. #3
    New ASP Guest

    Default NO

    No. server.mappath is only useful when you have a file and want to know its path.<BR><BR>But in my case, I have to know the path first then to create the file.<BR><BR>

  4. #4
    BalletChick Guest

    Default RE: NO

    That&#039s an interesting conjecture. So what do you suppose this would display?<BR><BR>&nbsp;&nbsp;&nbsp;response.write server.mappath("\")

  5. #5
    sm549 Guest

    Default RE: Help Me Please!!

    Try appending Request.ServerVariables("APPL_PHYSICAL_PATH") <BR>or fish for it yourself by running this test:<BR><BR>&nbsp&nbspDim Key<BR>&nbsp&nbspFor Each Key In Request.ServerVariables<BR>&nbsp&nbsp&nbsp&nbspRes ponse.Write "&ltBR&gt" & Key & " = " & Request.ServerVariables(Key)<BR>&nbsp&nbspNext<BR>

  6. #6
    New ASP Guest

    Default RE: NO

    I have a BBS page.<BR>The visitor will write some txt and I will save it to host hard disk. Before do that, I have to know the phisical path of my the ASP host will not tell me.)<BR>If I know it, for instance, is c:pubwebmydir<BR><BR>then I can use:<BR><BR>set fs = CreateObject("Scripting.FileSystemObject")<BR>set a = fs.CreateTextFile("c:pubwebmydir est.txt", True)<BR><BR>to create the txt file in the host&#039s hd.<BR>The problem is, before I create the txt file, how can I know the path?<BR> <BR>

  7. #7
    New ASP Guest

    Default Thanks!!!!! It works!!!

    Request.ServerVariables("APPL_PHYSICAL_PATH") just give the web root. But I find the detail path in the collection!!!<BR><BR>Thank you!! you are the life saver!!!<BR><BR>Thanks again!!!!!!!!!!!!<BR>

  8. #8
    Join Date
    Dec 1969

    Default My turn: (tee hee)

    Sometimes, you just have to feed it to them. Hints don&#039t work.<BR><BR>

Posting Permissions

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