PDA

View Full Version : Global variables in PHP


xariton
05-11-2005, 05:17 PM
I often have a problem with register_globals=Off in pnp.ini when my php script needs register_globals=On
There is good solution if register_globals set to Off on server.
Just put this at the beginning of your php script:
@import_request_variables("GPC");
extract($_SERVER);

And your script will work as if register_globals were set to ON ;)