Hi all,
I am trying to use php as a shell scripting language and need a little help.
PHP version: 4.1.2
<?
$test_root = whoami;
if ($test_root == 'root') {
exit('Cannot execute script as root');
}
?>
However, this little section fails even if I run the script as root. If I do:
<?
$test_root = whoami;
echo $test_root . "\n";
?>
It displays: root
Adding to this confusion, (I am sure my understanding is to blame here) - my functions don't seem to return values either.
I am not going to go into that because a fix here may result in a fix for that too.
I appreciate your help.
-mustafa.