我有以下Python代码(test.py):
name = input("What's your name? ")
print("Nice to meet you " + name + "!")
age = input("Your age? ")
print("So, you are already " + str(age) + " years old, " + name + "!")
我尝试用PHP执行它:
exec('"C:\python.exe" test.py', $output);
print_r($output);
但是Python代码中有两个输入。如何发送输入所询问的数据并继续执行代码?