Posted by Colin McKinnon on 10/30/31 11:25
ZeldorBlat wrote:
> getenv('USER');
>
> http://www.php.net/manual/en/function.getenv.php
Yeah, right.
Kleist wrote:
> I know that it rother not strict PHP question, but
> nevertheless, I'd like to know how to get username of the
> user who has run CLI php script via cron?
Might help if you told us what system this is on. If it's a Linux box you
could use:
$user=`id -un`;
or on most Unix boxes:
$user=`whoami`;
C.
Navigation:
[Reply to this message]
|