Home > Software design >  How can i deploy a php script with a python backend
How can i deploy a php script with a python backend

Time:10-03

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

CodePudding user response:

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
  • Related