note 14112 modified in language.variables.predefined.php by zak

From: Date: Fri, 27 Jul 2001 09:19:32 +0000
Subject: note 14112 modified in language.variables.predefined.php by zak
Groups: php.notes 
Request: Send a blank email to php-notes+get-15928@lists.php.net to get a copy of this message
Another useful variable is $REMOTE_USER which contains the username of a person authenticated through htaccess. One gotcha to watch out for with this one is referencing it in included files. It does not get passed to included files, just the main page, so you have to pass it in to your included files as a set global or as a function parameter. [Editor's Note: $REMOTE_USER is a global variable that is not accessible inside a function definition unless imported using the global keyword. i.e. function foo () { global $REMOTE_USER; //... } --zak@php.net] http://www.php.net/manual/en/language.variables.predefined.php.php

« previous php.notes (#15928) next »