0

I want to write my system output to a file with out using >filename in command line. Using the same format of the output.

system("ping -n 4 $host",$result);  
4

1 回答 1

0

改用exec您可以指定要存储的输出的数组。然后您可以使用fopen等将该数组写入文件。

于 2012-11-09T09:57:55.217 回答