Re: Write a FIFO file

From: Date: Tue, 20 Dec 2005 12:38:00 +0000
Subject: Re: Write a FIFO file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-227711@lists.php.net to get a copy of this message
Ok, I tried it before, it didn't work: For example, <?php $filename = "fifo" ; $dataFile = fopen( $filename, "a" ) ; if ( $dataFile ) { fwrite($dataFile,"TEST IN FIFO FILE\n"); fclose($dataFile); } else { die( "fopen failed for $filename" ) ; } ?> fifo file created as root: mkfifo fifo chmod 777 fifo Try to execute it and execution never ends... browser is waiting for ever ... No errors in error php error log. Any ideas? Jay Blanchard wrote:
[snip] I have a problem. I have created a fifo file (under linux) and I m not able to append some line from a php script. There is not output error, php just is executing for ever ... How can I write a fifo file? [/snip] Please have a look here; http://www.php.net/file as a starting point for file operations. You can append to a file with the fopen() function... http://www.php.net/fopen


« previous php.general (#227711) next »