1 回答

TA贡献1851条经验 获得超4个赞
确认我在 7.4 中遇到了相同的行为。我现在创建了一个笨拙的解决方法:
ob_start(); // buffer so we don't see the output generated at DOS prompt
$cmd_line='SET/P phpinput= & SET phpinput'; // Step 1: prompt user to enter a value for variable phpinput & Step 2: display the value for phpinput
$result=system($cmd_line); // Execute
$result=str_replace('phpinput=', '', $result); // Clean up the returned result
ob_end_clean(); // resume normal output
echo "\nReturned result from user typing is: $result\n";
- 1 回答
- 0 关注
- 89 浏览
添加回答
举报