ubuntu user

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cucucur
Forum Newbie
Posts: 7
Joined: Tue Apr 05, 2011 2:01 am

ubuntu user

Post by cucucur »

hi! I need to know the active ubuntu user when I run my php code.

I'm using php-java bridge, and I'm trying to create a java log with php, it doesn't work, and I'm quite sure it's permission problem, so, I want to know "who I am" when I connect.

Is there some command???

Thank you so much!!
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: ubuntu user

Post by Weirdan »

Code: Select all

echo `whoami`;
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: ubuntu user

Post by Jonah Bron »

Yes, Weirdan means that literally. Refer to the manual here:

http://php.net/operators.execution
cucucur
Forum Newbie
Posts: 7
Joined: Tue Apr 05, 2011 2:01 am

Re: ubuntu user

Post by cucucur »

Thank you so much!!!!
Post Reply