Skip to content

Monster Oasis

  • 浪況預測
  • KML2CSV
  • World Marathon

Month: December 2019

[PHP] php 由 pipe (stdin) 讀進檔案 再做處理, 類似 C 的 pipe line 方法

2019/12/27 by Monster
$cnt = 0;
$fp = fopen('php://stdin','r');
while ($line = stream_get_line($fp, 65535, "\n")) {
  echo "LINE #" . (++$cnt) . ": " . $line . "\n";
}

Categories Programming/php Tags php

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Blogroll

  • 02 浪況預測
  • Email
  • G Suite admin console
  • gandi
  • Google AdSense
  • Google Analytics
  • webHD
  • ★Amazon AWS console

Search

© 2021 Monster Oasis • Built with GeneratePress