BayEOS-PHP
 All Data Structures Namespaces Files Functions Variables Pages
testFifo.php
Go to the documentation of this file.
1 <?php
2 posix_mkfifo('/tmp/test',0600);
3 posix_mkfifo('/tmp/test.error',0600);
4 
5 $fp=fopen('/tmp/test','r');
6 $ep=fopen('/tmp/test.error','r');
7 while(true){
8  if($line=fread($fp,128)){
9  echo $line;
10  echo "got line\n";
11  }
12  if($line2=fread($ep,128)){
13  echo $line2;
14  echo "got line2\n";
15  }
16  sleep(1);
17 }
$fp
Definition: testFifo.php:5
$ep
Definition: testFifo.php:6