I’m wondering how I can call a python script from a class in Symfony. I keep getting an error that it can’t locate the script.
May 28 13:54:13 |INFO | PHP python: can't open file 'Request.py': [Errno 2] No such file or directory
The code is as followed:
$python = shell_exec("python Request.py"); echo $python;
The script is outside the symfony project, but I’m not quite sure how to get the path relative to the class file.
Source: Symfony Questions
Was this helpful?
1 / 0