note 82387 added to function.posix-getpwuid
| From: | ddascalescu at gmail dot com | Date: | Wed, 09 Apr 2008 02:14:47 +0000 |
| Subject: | note 82387 added to function.posix-getpwuid | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138042@lists.php.net to get a copy of this message | ||
Correction regarding my note below: get_current_user() does *not* get the name of the user the
script is running as. Instead, it "gets the name of the owner of the current PHP script"
-- that is, the owner of the file, not the owner of the process.
To properly get the running user, test if function_exists('posix_getpwuid') and if not,
assume you're running on Windows and call getenv('USERNAME').
----
Server IP: 209.41.74.194
Probable Submitter: 209.131.62.113
----
Manual Page -- http://www.php.net/manual/en/function.posix-getpwuid.php
Edit -- https://master.php.net/note/edit/82387
Del: integrated -- https://master.php.net/note/delete/82387/integrated
Del: useless -- https://master.php.net/note/delete/82387/useless
Del: bad code -- https://master.php.net/note/delete/82387/bad+code
Del: spam -- https://master.php.net/note/delete/82387/spam
Del: non-english -- https://master.php.net/note/delete/82387/non-english
Del: in docs -- https://master.php.net/note/delete/82387/in+docs
Del: other reasons-- https://master.php.net/note/delete/82387
Reject -- https://master.php.net/note/reject/82387
Search -- https://master.php.net/manage/user-notes.php