I'm trying to create Rest API with Laravel and I tried this using annotations I will show your my code to get your opinions
/**
* @Get("/execution/")
* @param \string $filePath
* @param \string $variable
*/
public function execScript(string $filePath , string $variable)
{
$pyscript = 'C:\Users\e5554688\Desktop\P10_AP.py';
$python = 'C:\Python\python.exe';
/**$filePath = 'C:\Users\e5554688\Desktop\log0906';
$variable='1=48';*/
$message=exec("$python $pyscript $filePath $variable");
print_r($message);
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire