HttpRequest.PhysicalPath プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)

要求されURL一致する物理ファイル システム パス取得します

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Visual Basic (宣言)

Public ReadOnly Property PhysicalPath As String

Visual Basic (使用法)

Dim instance As HttpRequest Dim value As String

value = instance.PhysicalPath

C#

public string PhysicalPath { get; }

C++

public: property String^ PhysicalPath { String^ get (); }

J#

/** @property */ public String get_PhysicalPath ()

JScript

public function get PhysicalPath () : String

プロパティ
現在の要求ファイル システム パス

使用例使用例

HtmlEncode メソッド使用して PhysicalPath プロパティの値を HTML エンコードし、エンコードした値を WriteLine メソッド使用してファイル書き込むコード例次に示します。このコード例は、HttpRequest クラストピック取り上げているコード例一部分です。

Visual Basic

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

C#

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

プラットフォームプラットフォーム

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 によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.01.11.0

参照参照

関連項目
HttpRequest クラス
HttpRequest メンバ
System.Web 名前空間