Back tick operator for executing shell commands
Say you want to know what user is executing your scripts or what account you are running under. Here's a quick way to do it.
<?php
$username = `whoami`;
echo $username;
$username = `whoami`;
echo $username;
Just surround your shell commands with a back tick ` and it will store the output in a variable.
The back tick is on the key with the tilde ~ and to the left of the one (1) key.
[Click to add or edit comments])
Please prepend comments below including a date