Skip to content

Instantly share code, notes, and snippets.

@naosim
Created July 29, 2013 10:52
Show Gist options
  • Save naosim/6103566 to your computer and use it in GitHub Desktop.
Save naosim/6103566 to your computer and use it in GitHub Desktop.
PHPでパイプからの入力を取得する方法
<?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