$path_info

#1
Not sure if this is a bug or if it's just done differently in LiteSpeed.

In PHP under Apache, I was able to call the global PATH_INFO method to find out what had been entered into the URL, but this doesn't work under LiteSpeed. Is there a work-around?

--Josh
 

mistwang

LiteSpeed Staff
#2
It should work, please give an example.
If you have php script called /phpinfo.php, if you access URI /phpinfo.php/path/info, the PATH_INFO env should be set to "/path/info".
 
#3
Sure! At http://www.prebeltway.org/index.php I have included the following line of code:

Code:
echo "<p>PATH_INFO = " . $PATH_INFO . "</p>";
However, it always displays nothing for the value of $PATH_INFO regardless of what I put after index.php. Am I just doing something wrong here?

Thanks for your quick response!

--Josh
 

mistwang

LiteSpeed Staff
#4
register_globals is off, if you want to use those as global variable you need to turn on register_globals. It is not recommended though.
A better way is to use $_SERVER['PATH_INFO'], it is set regardless the state of register_globals
 
Top