In this case there is no information to generate the PATH_INFO of $_SERVER, because, it rescues the additional information in a URL from a script php, disregarding in question the Query String (information found in this array $_SERVER['QUERY_STRING']).
The $_SERVER second site php.com is a array containing information such as headers, paths, and script locations.
To rescue this PATH_INFO must have that kind of structure (layout) of URL:
http://localhost/script.php/some/all/run?g=10
commando:
echo $_SERVER['PATH_INFO'];
exit:
/some/all/run
Observing: if by chance the Query String come before also does not work have to follow this structure for the environment variable to be loaded.
Example: http://localhost/script.php?g=10/some/all/run, This does not work for loading $_SERVER['PATH_INFO'].
Maybe that’s not what you need, and it causes confusion with $_SERVER['REQUEST_URI'] that brings more information about the URL executed.
Like the command echo $_SERVER['REQUEST_URI'] the exit is:
/script.php/some/all/run?g=10
bringing complete information from URL for the execution of a particular script php.
References:
Thanks... Happy New Year @Virgilio!
– PululuK
@Andrépka equally, a great year to all...
– novic