Created
July 29, 2013 10:52
-
-
Save naosim/6103566 to your computer and use it in GitHub Desktop.
PHPでパイプからの入力を取得する方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getPIPE() { | |
$pipe = ""; | |
while (!feof(STDIN)) { | |
$pipe .= fread(STDIN, 4096); | |
} | |
return $pipe; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment