try something like this:     $result = $_SERVER['PHP_SELF']
  
  
about 
- THE SCRIPT -- THE LIST OF VARIABLES AND RESULTS ON THIS SERVER -
  
PHP_SELF/wiki/pmwiki.php
   -   filename of the currently executing script
SCRIPT_NAME/wiki/pmwiki.php
   -   path of the current script
SCRIPT_FILENAME/home/username-hidden/snippetspub.com/wiki/pmwiki.php
   -   absolute pathname of the currently executing script
  
about 
- THE PAGE - 
  
SCRIPT_URIhttps://www.snippetspub.com/Site/ServerInfo
   -   URI of the current page
HTTP_REFERERhttps://snippetspub.com/Site/ServerInfo
   -   complete URL of the current page (not reliable because not all user-agents support it)
  
about 
- THE SERVER - 
  
SERVER_ADDR173.236.253.66
   -   IP address of the host server
SERVER_NAMEwww.snippetspub.com
   -   name of the host server (such as www.w3schools.com)
HTTP_HOSTwww.snippetspub.com
   -   Host header from the current request
SERVER_SOFTWAREApache
   -   server identification string (such as Apache/2.2.24)
SERVER_PROTOCOLHTTP/2.0
   -   name and revision of the information protocol (such as HTTP/1.1)
HTTPSon
   -   Is the script queried through a secure HTTP protocol
GATEWAY_INTERFACECGI/1.1
   -   version of the Common Gateway Interface (CGI) the server is using
REQUEST_URI/Site/ServerInfo
   -   request URI of page requesting the page
REQUEST_METHODGET
   -   request method used to access the page (such as POST)
SERVER_PORT443
   -   port on the server machine being used by the web server for communication (such as 80)
REQUEST_TIME1725766101
   -   timestamp of the start of the request (such as 1377687496)
HTTP_ACCEPT*/*
   -   Accept header from the current request
QUERY_STRINGn=Site/ServerInfo
   -   query string if the page is accessed via a query string
HTTP_ACCEPT_CHARSET 
   -   Accept_Charset header from the current request (such as utf-8,ISO-8859-1)
  
about 
- THE USER -  -   Information about the Browser viewing the page
  
REMOTE_ADDR3.17.176.32
   -   IP address from where the user is viewing the current page
HTTP_CLIENT_IP 
   -   Client IP address
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
   -   User Browser: Self-Reported info
REMOTE_HOST 
   -   Host name from where the user is viewing the current page
REMOTE_PORT62366
   -   port being used on the user's machine to communicate with the web server
SERVER_ADMINwebmaster@snippetspub.com
   -   value given to the SERVER_ADMIN directive in the web server configuration file
SERVER_SIGNATURE 
   -   server version and virtual host name which are added to server-generated pages
PATH_TRANSLATED 
   -   file system based path to the current script
  
  
- F Y I -Related Global Information
  
get_current_user()username-hidden
  
__FILE__/home/username-hidden/snippetspub.com/wiki/cookbook/ServerInfo.php
   - Super Global - the original file containg this code regardless of include/include_once
__DIR__/home/username-hidden/snippetspub.com/wiki/cookbook
   - Super Global - For Comparison: Note how this shows its directory as /cookbook
dirname(__DIR__)/home/username-hidden/snippetspub.com/wiki
   -   dirname (Parent) of PHP magic constant