Re: Using system
| From: | Gal | Date: | Wed, 17 Sep 2003 13:46:27 +0000 |
| Subject: | Re: Using system | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162888@lists.php.net to get a copy of this message | ||
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