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?

  2. devorem

    devorem Perch

  3. tr1stan

    tr1stan Perch

    Try this:

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

    tr1stan Perch

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

    Here is the code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <title>Display all IIS Request.ServerVariables</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style type="text/css">
    	font-family: Georgia, "Times New Roman", Times, serif;
    <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"
    		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	
    And here is the zip:
    Click here to dl

    Always taking it one step too far :p

  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:


Share This Page

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