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 關注
- 80 瀏覽
添加回答
舉報