Execute python file in Laravel and save data into DB
To troubleshoot your problem, please check the exception. By default, it doesn't show any underlying errors.
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
}
Don't forget to include,
use Symfony\Component\Process\Exception\ProcessFailedException;
How to run python script with Laravel's command fire method?
try PHP exec function: http://php.net/manual/en/function.exec.php
exec('C:\Python34\python H:\myapp\app\python\questionPopulator.py');
Related Topics
Saving Images in Database MySQL
Enabling 'Strict_Types' Globally in PHP 7
Pdoexception "Could Not Find Driver" in PHP
How Does PHP Compare Strings with Comparison Operators
File_Get_HTML Displays Fatal Error Call to Undefined Function
Undefined Index with PHP Sessions
Process Mathematical Equations in PHP
Backreference Does Not Work in PHP
How to Create and Store Md5 Passwords in MySQL
How to Get Email and Their Attachments from PHP
How to Determine a File's True Extension/Type Programmatically