What is the fastest way to execute Python from PHP assuming that I need to pass variables to Python script and get result from it?
Asked
Active
Viewed 151 times
1 Answers
2
By using the popen() function:
$result = popen('python yourscript.py ' . $args, 'r');

Konstantin Yovkov
- 62,134
- 8
- 100
- 147