0

I have a hosting server which hosts my PHP Website and I have another server (Windows Server) which has Python App. I need to launch a Python App from my PHP Website when a user clicks the button on my website. I also need to get return data and display it on the website. How can I achieve that?

Daze
  • 1
  • 1

1 Answers1

0

Take from Running a Python script from PHP

<?php 

$command = escapeshellcmd('/usr/custom/test.py');
$output = shell_exec($command);
echo $output;

?>
balderman
  • 22,927
  • 7
  • 34
  • 52