ID:               16081
 Updated by:       [EMAIL PROTECTED]
-Summary:          doesn't seem to honor fopen stdin position in code
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: tru64 5.0a
 PHP Version:      4.1.2
 New Comment:

Maybe it's your terminal buffering?

Have you tried with 'flush();' after your print statements?


Previous Comments:
------------------------------------------------------------------------

[2002-03-14 14:51:20] [EMAIL PROTECTED]

It appears that if I have a fopen to stdin anywhere in my code that PHP
will prompt for stdin at the beginning of its execution instead of
where I put it in the code.

The following example shows it:
#!/usr/local/bin/php
<?

print "BEFORE\n";
$cd=fopen("php://stdin","r");
$cd2=fread($cd,1);
print "AFTER\n";
?>

Now as soon as I execute it, it sits and waits for me to enter stdin,
then prints
BEFORE
AFTER

It should be showing BEFORE and then prompt for STDIN, unless there is
something major I am missing here.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16081&edit=1

Reply via email to