Helpful Information
 
 
Category: PHP Development
Accessing enviroment variables inside functions

Hey all:

I am trying to access the enviroment variables (mainly the $REMOTE_USER one) inside a function, but it doesnt seem to be able to access it. I was wondering how I might access it in the function? Any help appreciated!


------------------
Regards,
Andrew
IIS Manager
Uniworx - The Student Website
http://www.uniworx.com.au

Not sure, but maybe a:

global $REMOTE_USER;

inside your function will do the trick. That'd work for any other variable defined outside of the function's scope, but I'm not sure if it applies to server variables (likely so for consistency's sake).

--Josh










privacy (GDPR)