使用 PHP 接收 Linux 中 pipe 的 輸出資料

在 Linux 常使用到 pipe(|), 要如何讓 PHP 讀取 pipe 送過來的值呢?

  • ex: cat file.txt | ./read_pipe.php # 將 file.txt cat 印出, 送給 read_pipe.php 接收處理.

閱讀全文〈使用 PHP 接收 Linux 中 pipe 的 輸出資料〉