note 117584 added to function.get-current-user

From: Date: Thu, 02 Jul 2015 08:52:40 +0000
Subject: note 117584 added to function.get-current-user
Groups: php.notes 
Request: Send a blank email to php-notes+get-203023@lists.php.net to get a copy of this message
If you want to get the name of the user who executes the current PHP script, you can use <?php $username = getenv('USERNAME') ?: getenv('USER'); echo $username; // e.g. root or www-data ?> ---- Server IP: 72.52.91.14 Probable Submitter: 89.244.156.18 ---- Manual Page -- http://php.net/manual/en/function.get-current-user.php Edit -- https://master.php.net/note/edit/117584 Del: integrated -- https://master.php.net/note/delete/117584/integrated Del: useless -- https://master.php.net/note/delete/117584/useless Del: bad code -- https://master.php.net/note/delete/117584/bad+code Del: spam -- https://master.php.net/note/delete/117584/spam Del: non-english -- https://master.php.net/note/delete/117584/non-english Del: in docs -- https://master.php.net/note/delete/117584/in+docs Del: other reasons-- https://master.php.net/note/delete/117584 Reject -- https://master.php.net/note/reject/117584 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203023) next »