[TxMt] Re: Unwanted newline php

Allan Odgaard mailinglist at textmate.org
Sun Dec 13 17:30:08 UTC 2009


On 11 Dec 2009, at  8:41, Ryan Fitzer wrote:

> $fstat = fstat(STDIN);
> $stdin = fread(STDIN, $fstat['size']);

I am surprised this works. STDIN is a pipe and can’t be stat’ed for 
file size.

I would suggest instead using file_get_contents("php://stdin").



More information about the textmate mailing list