linux - stream out put to text file php centos -
i have follwoing code
<?php $handle = popen('rate -c 192.168.122.0/24 2>&1', 'r'); echo "$handle'; " . gettype($handle) . "\n"; $read = fread($handle, 2096); echo $read; pclose($handle); ?>
i want out put of rate command text file third party tool bandwith of when run code got follwing error
'resource id #2'; resource sh: rate: command not found
but when type rate command on terminal can see out put
any ideas?
thank in advance
php can't find rate program. path envorinment variable not contain folder rate resides.
set path environment variable putenv or give full path in call.
Comments
Post a Comment