try this:

<?php
$sMyHostname = exec('uname -a 2>&1');
echo "\n".$sMyHostname."\n";
?>

Uros wrote:
Hello!

I'm pulling my hair. What is the right syntax to set output of some system
call to variable.

I tried everything (system, shell_exec,exec) and always get output to
screen.

Please help.

PHP version 4.3.3 CLI


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to