★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000072.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  Accessing enviroment variables inside functions

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Accessing enviroment variables inside functions
Andrew
Junior Member
posted July 16, 1999 08:45 PM     Click Here to See the Profile for Andrew   Click Here to Email Andrew     Edit/Delete Message Reply w/Quote
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

jpenix
Member
posted July 18, 1999 11:28 PM     Click Here to See the Profile for jpenix   Click Here to Email jpenix     Edit/Delete Message Reply w/Quote
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

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.