Reading output from popen() : popen « File Directory « PHP
- PHP
- File Directory
- popen
Reading output from popen()
<?php
$ph = popen('/sbin/route','r') or die($php_errormsg);
while (! feof($ph)) {
$s = fgets($ph) or die($php_errormsg);
}
pclose($ph) or die($php_errormsg);
?>
Related examples in the same category