<?php if(!defined("STDIN")) { define("STDIN", fopen('php://stdin','r')); } //php5.2里面STDIN已经定义了 echo "Hello! What is your name (enter below):\n"; $strName = fread(STDIN, 80); echo 'Hello ',$strName, "\n";
<?php if(!defined("STDIN")) { define("STDIN", fopen('php://stdin','r')); } //php5.2里面STDIN已经定义了 echo "Hello! What is your name (enter below):\n"; $strName = fread(STDIN, 80); echo 'Hello ',$strName, "\n";