【发布时间】:2017-01-11 16:01:03
【问题描述】:
我知道我可以像这样在命令行/shell 脚本上接收参数:
!#/usr/bin/php
<?php
# file name - process.php
print_r($argv);
但是如下重定向呢:
#> ./process.php < input.txt
我如何读取文件,input.txt 是字符串参数还是已经创建了某种类型的文件指针?
【问题讨论】:
标签: php command-line-interface stdin