I have a simple php script 'top.php' with shell_exec function.
Code:
<?php
echo shell_exec("top");
?>
What I am looking for is to view results of 'top' command on a web browser. So, if I access http://192.168.1.1/top.php I want to see results of top command. It is essential to view results of top command periodically as you would see in a command line terminal.
However, when I access 'http://192.168.1.1/top.php' on web browser, it does not display anything. Same behaviour when I execute top.php on command line (as 'php top.php').
I am not sure what or where it is going wrong.....