|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-16 06:19 UTC] derick@php.net
[2002-12-16 06:26 UTC] sniper@php.net
[2002-12-16 07:42 UTC] agdr at dcs dot st-and dot ac dot uk
[2002-12-16 08:28 UTC] sniper@php.net
[2002-12-16 09:16 UTC] agdr at dcs dot st-and dot ac dot uk
[2002-12-16 09:56 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Feb 14 11:00:01 2026 UTC |
In bug report 18022 you said that you have fixed the bug that only lets php read the first line from stdin when used in a pipe. I am still finding this bug. The code i use is: #!/usr/local/bin/php -q <?PHP $fp = fopen("php://stdin", "r"); $username = $argv[1]; $mail = ""; while (!feof($fp)) { $mail = $mail.fgets($fp, 4096); } print($mail); fclose($fp); ?> This only prints the first line of any file I pipe to it using cat. PHP was compiled with: '--with-pgsql' '--enable-cli' '--enable-ftp' '--enable-sockets'.