<html> <head><title>ASP MapPath Demo</title></head> <body> <% response.write "<font face='HELVETICA'>" &_ "<b>ASP Server.MapPath Demonstration</b><br><br>The "File.txt" file does not actually exist;"&_ "unless you created one that is, this is used as a demonstration of how to use mappath.<br>" &_ "For a more dramatic effect, place this file in a sub folder of your website's root folder.<br><br>" &_ "This path will take you to the folder this file is currently running in.<br>" &_ "<table border=0><tr><td><b>ASP Path:</b> </td><td>server.mappath ("file.txt")</td></tr>" &_ "<tr><td><b>Output:</b></td><td> " & server.mappath("file.txt") & "</td></tr></table>" &_ "<br><br>" &_ "This path will take you to the root of your website, notice the use of the "/" at the beginning of the path.<br>" &_ "<table border=0><tr><td><b>ASP Path:</b> </td><td>server.mappath ("/file.txt")</td></tr>" &_ "<tr><td><b>Output:</b></td><td> " & server.mappath("/file.txt") & "</td></tr></table>" &_ "<br><br>For a more detailed explanation of Server.MapPath please visit this <a style=text-decoration:none href='http://www.w3schools.com/ASP/met_mappath.asp'>Helpful Site</a>" &_ "</font>" %> </body> </html> |