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 when you have safe mode on in your php.ini 
file, because then
         // it doesn't allow commands to be run within backtics.

?>

Marc van Duivenvoorde

At 04:21 PM 7/11/2001 +0800, you wrote:
>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.
>
>Does anybody know the reasons?
>
>Thank you very much!
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to