Hi,
I'm having a problem with the following script. It seems that whenever I load it through my browser (which uses the php module) it doesnt run the system command. If I run it through php cgi by typing "php script.php" at the command prompt i recieve the correct output. Can somone tell me what i'm doing wrong? Thanks,
Kenneth Donaldson
Heres the script --->
function showTop() {
system ("top -b > idletmp");
$topRead = readfile ("idletmp");
return $topRead;
}
?>
<pre>
<?
echo (idleTime());
?>
</pre>
<--- As much as I refresh the info doesnt change. The only time it will change is if I run the script through PHP-CGI first. This is ofcourse because it changes my idletmp file.
Thanks,
~KC