HttpRequest.PhysicalApplicationPath Egenskap

Definition

Hämtar sökvägen till det fysiska filsystemet i rotkatalogen för det serverprogram som körs.

public:
 property System::String ^ PhysicalApplicationPath { System::String ^ get(); };
public string PhysicalApplicationPath { get; }
member this.PhysicalApplicationPath : string
Public ReadOnly Property PhysicalApplicationPath As String

Egenskapsvärde

Filsystemsökvägen för det aktuella programmets rotkatalog.

Exempel

I följande kodexempel används HtmlEncode metoden för att HTML-koda värdet för PhysicalApplicationPath egenskapen och WriteLine metoden för att skriva det kodade värdet till filen. Det här kodexemplet är en del av ett större exempel för HttpRequest klassen.

// Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath));
sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath));
sw.WriteLine(Server.HtmlEncode(Request.RawUrl));
' Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath))
sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath))
sw.WriteLine(Server.HtmlEncode(Request.RawUrl))

Gäller för