adding a new key,value pair to the $_SERVER global array
Posted: Fri Sep 28, 2007 9:41 pm
Hello,
Is it possible to add a new key-value pair to the $_SERVER superglobal array?
For example, when portions of facebook's code was leaked, there were many include clauses containing $_SERVER['PHP_ROOT']. I am guessing that $_SERVER['PHP_ROOT'] is storing the path to where all of the source code is kept, a path which is not accessible to an outsider.
I want to do the same, but I haven't found any resources that explain how this is done. Is modifying the $_SERVER array done by changing the configuration on the server app, such as appache?
Or perhaps there is a better approach to storing the path to a directory outside of the public one?
THanks
Is it possible to add a new key-value pair to the $_SERVER superglobal array?
For example, when portions of facebook's code was leaked, there were many include clauses containing $_SERVER['PHP_ROOT']. I am guessing that $_SERVER['PHP_ROOT'] is storing the path to where all of the source code is kept, a path which is not accessible to an outsider.
I want to do the same, but I haven't found any resources that explain how this is done. Is modifying the $_SERVER array done by changing the configuration on the server app, such as appache?
Or perhaps there is a better approach to storing the path to a directory outside of the public one?
THanks