Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ashleyconnor/9d2f0ff16b9e7423eddef927af6a2264 to your computer and use it in GitHub Desktop.
Save ashleyconnor/9d2f0ff16b9e7423eddef927af6a2264 to your computer and use it in GitHub Desktop.
> echo.py
print("Hello World")
> echo.php
<?php
$command = escapeshellcmd('python echo.py');
$output = shell_exec($command);
echo $output;
?>
$ php echo.php
Hello World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment