Re: Newbie - am wondering how to use PHP (?) to get the name of the user logged on to 'my' https:// site

From: Date: Wed, 20 Feb 2008 17:27:50 +0000
Subject: Re: Newbie - am wondering how to use PHP (?) to get the name of the user logged on to 'my' https:// site
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-28803@lists.php.net to get a copy of this message
Greg Cocks wrote:
Gustav, *Works like a charm! Much appreciated... SO CLEAN AND SIMPLE!* If you or anyone feels so inclined: $logged = $_SERVER["AUTH_USER"]; print $logged."<br />"; list($logged_on_userdomain,$logged_on_username) = split("\\",$logged); print $logged_on_username."<br />"; It prints the $logged just fine as "domain\user", no speech marks of course. However the spilt won't work, I guess because of the double back slash - gives the error: Warning: split() [function.split]: REG_EESCAPE in ...
Split wants a regex. Use explode. -Stut -- http://stut.net/

« previous php.windows (#28803) next »