On Friday 02 April 2004 23:09, Brian Duke wrote: > If I wanted to use exec() for this project in the future, is: > > (shell_exec ("free -b")) = (exec("free -b", $data ,$result_code))
They're different, see manual for details. > I tried using exec as > exec("free -b", $data ,$result_code)); > but I didn't get the $data I was expecting. Are my variables mixed up? exec("free -b", $data ,$result_code); print_r($data); Array ( [0] => total used free shared buffers cached [1] => Mem: 256917504 249401344 7516160 0 29487104 80941056 [2] => -/+ buffers/cache: 138973184 117944320 [3] => Swap: 271392768 150523904 120868864 ) Works fine for me. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* In the strict scientific sense we all feed on death -- even vegetarians. -- Spock, "Wolf in the Fold", stardate 3615.4 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php