search for in the  
<get_cfg_varget_defined_constants>
Last updated: Thu, 19 May 2005

get_current_user

(PHP 3, PHP 4, PHP 5)

get_current_user --  Gets the name of the owner of the current PHP script

Description

string get_current_user ( void )

Returns the name of the owner of the current PHP script.

See also getmyuid(), getmygid(), getmypid(), getmyinode(), and getlastmod().



User Contributed Notes
get_current_user
comicforum at lelon dot net
22-Apr-2005 04:51
Under windows, this function does not work the same in Apache as it does in IIS.  If you want the user name in apache, you have to use...

getenv("REMOTE_USER");
chris
04-Jan-2005 09:36
If you want to get the absolute name of the file you are currently on, use this:

<?
$rest
= explode("php.net/", $PHP_SELF);
$rest = $rest[0];
echo(
"/home/".get_current_user()."/public_html".$rest);
?>
Just change php.net/ to your site's domain and a slash.

<get_cfg_varget_defined_constants>
 Last updated: Thu, 19 May 2005
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: The Server Pages
Last updated: Thu May 19 17:35:34 2005 CDT