use Symfony\Component\Process\Process; use Symfony\Component\Process\Exception\ProcessFailedException; $process = new Process(['python','/path/to/your_script.py',$arg(optional)]); $process->run(); // executes after the command finishes if (!$process->isSuccessful()) { throw new ProcessFailedException($process); } echo $process->getOutput();
composer require symfony/process
Sign up for our newsletter to stay up to date.
We care about the protection of your data. Read our Privacy Policy.
Schopenhauerstr. 71
80807 München
max@42coders.com
+49 (0)176 / 724 306 82
© 2024 42coders All rights reserved.