I run the php script as following:
?php
//test.php
system(/usr/bin/sudo /usr/bin/quota -v test)
?
php test.php - I can get the output
in the browser: http://localhost/test.php - I cannot see any output
However,
?php
system(finger);
?
I can both get the output in the console and browser.
I would do it this way .
?
$quota = `/usr/bin/sudo /usr/bin/quota -v test`;
// please mind that the command is between backtics and not quotes
echo $quota;
// It probably doesn't produce a nice looking output but you can
change that yourself
// This doesn't work
hhhm, I played around a little and found another solution which you might
find usefull
?
exec(/bin/ls -al /home/marcd,$ls);
Array($ls);
$max = sizeof($ls);
$num = 0;
while ($num = $max)
{
echo $quota[$num],br\n;
$num++;
}
?
This way you can execute any command and put the
3 matches
Mail list logo