php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "$_SCRIPT_NAME"

How can the global variable $_SCRIPT_NAME be used in PHP to retrieve the currently executed file?

To retrieve the currently executed file in PHP, you can use the global variable $_SERVER['SCRIPT_NAME']. This variable contains the path of the curren...

PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.