note 87030 deleted from wrappers by bjori

From: Date: Fri, 10 Dec 2010 14:23:40 +0000
Subject: note 87030 deleted from wrappers by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174769@lists.php.net to get a copy of this message
Note Submitter: travis at blackpulp dot com ---- Not exactly sure why this was the solution, but if you are trying to fopen("php://input", "r") and then wanting to print out the contents of the stream, you cannot do this: <? $putdata = fopen("php://input", "r"); while ($data = fread($putdata, 1024)) { print $data; } ?> On the above code, for some reason seemed to be stuck in an endless loop. Im a noob, so I don't know why this was happening.... BUT, this is what worked for me <? $fp = fopen('php://input','r'); print stream_get_contents($fp); ?>

« previous php.notes (#174769) next »