Funny php://stdout behaviour

From: Date: Mon, 22 Jan 2001 15:44:50 +0000
Subject: Funny php://stdout behaviour
Groups: php.general 
Request: Send a blank email to php-general+get-36157@lists.php.net to get a copy of this message
Hi! When calling the php4 code below, sometimes the browser receives -the "HTML estandar text" -sometimes the "Text generated from PHP" (but NEVER both!) -and ocassionaly the error: "Warning: fopen("php://stdout","w") - Bad file descriptor in /home/sites/site74/web/_proc/pruebas/stdout-test.php on line 7 unable to open device" <html> <body> <p>HTML estandar text</p> <?php $fd = fopen ("php://stdout", "w") or die("unable to open device"); fwrite ($fd, "\nText generated from PHP"); fclose ($fd); ?> <p>HTML estandar text...</p> </body> </html> You can test in http://www.lanzarotedigital.com/_proc/pruebas/stdout-test.php (reload several times to see results). Can you help? Thanks a lot. Ruben.

« previous php.general (#36157) next »