标签:
<?php #!/usr/local/bin/php -q function read(){ $fp = fopen("php://stdin", "r"); while(!feof($fp)) { $tmp = fgets($fp, 255); $input = $input. $tmp; } fclose($fp); return $input; } $input = read(); echo $input;
php处理文件流
cat a.txt |/usr/local/bin/php in.php
标签:
原文地址:http://www.cnblogs.com/lsmsky/p/4212077.html