Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我需要将变量传递给 Python 脚本并从中获取结果,那么从 PHP 执行 Python 的最快方法是什么?
通过使用popen()函数:
$result = popen('python yourscript.py ' . $args, 'r');