1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PHP

1
Last updated at Posted at 2025-09-16

$_SERVER

スーパーグローバル変数
$_SERVER — サーバー情報および実行時の環境情報

$_SERVER['PHP_SELF']

現在実行しているスクリプトのファイル名です。
ドキュメントルートから取得されます。
例えば、http://example.com/foo/bar.php というアドレス上にあるスクリプトでは
$_SERVER['PHP_SELF'] は /foo/bar.php となります。

$_SERVER['REQUEST_URI']

ページにアクセスするために指定された URI。
リクエストされたURI全体(クエリ文字列を含む)。
パス + クエリ文字列が入っている。
例えば、 '/index.html'

$_SERVER['QUERY_STRING']

クエリ文字列部分だけ を取得したい場合は $_SERVER['QUERY_STRING']

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?