php linux 下等待输入
2021-01-15 本文已影响0人
vins
<?php
fwrite(STDOUT, "请输入消息 Please input msg1:");
$msg1 = trim(fgets(STDIN));
echo $msg1.PHP_EOL;
fwrite(STDOUT, "请输入消息 Please input msg2:");
$msg2 = trim(fgets(STDIN));
echo $msg2.PHP_EOL;
<?php
fwrite(STDOUT, "请输入消息 Please input msg1:");
$msg1 = trim(fgets(STDIN));
echo $msg1.PHP_EOL;
fwrite(STDOUT, "请输入消息 Please input msg2:");
$msg2 = trim(fgets(STDIN));
echo $msg2.PHP_EOL;