Freigeben über


HttpRequest.PhysicalPath-Eigenschaft

Ruft den physikalischen Dateisystempfad entsprechend dem angeforderten URL ab.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public ReadOnly Property PhysicalPath As String
'Usage
Dim instance As HttpRequest
Dim value As String

value = instance.PhysicalPath
public string PhysicalPath { get; }
public:
property String^ PhysicalPath {
    String^ get ();
}
/** @property */
public String get_PhysicalPath ()
public function get PhysicalPath () : String

Eigenschaftenwert

Der Dateisystempfad der aktuellen Anforderung.

Beispiel

Im folgenden Codebeispiel wird die HtmlEncode-Methode für das Codieren des Werts der PhysicalPath-Eigenschaft im HTML-Format verwendet und die WriteLine-Methode für das Schreiben des codierten Werts in die Datei. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels für die HttpRequest-Klasse.

' 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));

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

HttpRequest-Klasse
HttpRequest-Member
System.Web-Namespace