[Python] How to run Python Script in Laravel?

Discussão em 'Python' iniciado por Stack, Dezembro 19, 2024.

  1. Stack

    Stack Membro Participativo

    I wanted to know how to run python script using php code. I have tried different options like

    $output = exec("python /var/GAAutomationScript.py");

    $command = escapeshellcmd('/var/GAAutomationScript.py');
    $output = shell_exec($command);


    But unable to run the python script. My application is in Laravel. Is it possible to run python script using Laravel scheduler jobs e.g. using artisan commands?

    Continue reading...

Compartilhe esta Página