I am new to aws and I want to deploy a php script to ec2 which executes a python file in the backend. I am using windows, how do i go about deploying this?
Thanks
Advertisement
Answer
I have already tested it using Linux server you can use
<?php $path = escapeshellcmd('backend.py'); $exec = shell_exec($command); if($exec){ // verify what the python file returned as function } ?>
Important : Make sure you gave the file using your root terminal the command
$ chmod 777 path_to_your_php