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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -