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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux