HttpRequest.PhysicalApplicationPath Propriété

Définition

Obtient le chemin d'accès physique, dans le système de fichiers, du répertoire racine de l'application serveur en cours d'exécution.

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

Valeur de propriété

Chemin d'accès au répertoire racine de l'application actuelle dans le système de fichiers.

Exemples

L’exemple de code suivant utilise la HtmlEncode méthode pour encoder au format HTML la valeur de la PhysicalApplicationPath propriété et la WriteLine méthode pour écrire la valeur encodée dans le fichier. Cet exemple de code fait partie d’un exemple plus grand fourni pour la HttpRequest classe .

// 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))

S’applique à