note 100703 added to function.shell-exec
| From: | fabjoa dot mwoz at gmail dot com | Date: | Mon, 01 Nov 2010 12:02:27 +0000 |
| Subject: | note 100703 added to function.shell-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173637@lists.php.net to get a copy of this message | ||
I don't know how it goes in Windows, but in Linux, shell returns result with a line break at
the end, I guess to make it more readable in shell, so don't forget to use trim() to
encapsulate the returned result!
if(trim(shell_exec('whoami'))!='www-data')
----
Server IP: 130.206.1.5
Probable Submitter: 62.83.131.16
----
Manual Page -- http://www.php.net/manual/en/function.shell-exec.php
Edit -- https://master.php.net/note/edit/100703
Del: integrated -- https://master.php.net/note/delete/100703/integrated
Del: useless -- https://master.php.net/note/delete/100703/useless
Del: bad code -- https://master.php.net/note/delete/100703/bad+code
Del: spam -- https://master.php.net/note/delete/100703/spam
Del: non-english -- https://master.php.net/note/delete/100703/non-english
Del: in docs -- https://master.php.net/note/delete/100703/in+docs
Del: other reasons-- https://master.php.net/note/delete/100703
Reject -- https://master.php.net/note/reject/100703
Search -- https://master.php.net/manage/user-notes.php