Testing ASPUpload..Server address?

Discussion in 'General Web Coding' started by danjaruss, Nov 19, 2004.

  1. danjaruss

    danjaruss Guppy

    I want to test ASpUpload and ASPJPEG, but I need the drive address on the server where the site files are stored.

    How do I find what the location of my site files are on the server?

    Thanks
  2. devorem

    devorem Perch

  3. tr1stan

    tr1stan Perch

    Try this:

    Code:
    <%= Response.Write(request.ServerVariables("APPL_PHYSICAL_PATH"))%>
    T
  4. tr1stan

    tr1stan Perch

    I've written a little script that will show you all the server variables:

    Here is the code:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>Display all IIS Request.ServerVariables</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style type="text/css">
    body{
    	font-family: Georgia, "Times New Roman", Times, serif;
    	padding:5px;
    	margin:5px;
    }
    </style>
    </head>
    <body>
    <h1>Display all IIS Request.ServerVariables</h1>
    <p>Written by: <a href="http://www.tr1stan.com" title="Click here to view his site">Tr1stan</a> {19/11/04}</p>
    <% 	
    For Each ServerVar In Request.ServerVariables 
    	if x mod 2 = 0 then
    		bgcolour = "#ccc"
    	else
    		bgcolour = "#999"
    	end if 
    	response.write("<div style=""height:20px;border: 1px solid #ccc; width:250px;float:left;clear:both;background: "& bgcolour &""">" & ServerVar & "</div><div style=""min-height:20px;border: 1px solid #ccc;margin-left:250px;"">&nbsp;" & Request.ServerVariables(ServerVar)&"</div>"& vbCR)
    	x = x + 1	
    Next 
    %>
    </body>
    </html>
    And here is the zip:
    Click here to dl

    Always taking it one step too far :p

    Tr1stan
  5. Nathan

    Nathan Perch

    When writing to text files, I find the absolute address path using the following code:

    <%

    response.write (Server.MapPath("test.asp"))

    %>

    Create a page with the above code, save it as test.asp and place it in the folder that you want to find the file path. It will return somthing like:

    D:\jodohome\yash\corfu-travel-guide.info\message_boards\test.asp

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services