Skip to content

Instantly share code, notes, and snippets.

@lucasmaurice
Created August 9, 2018 19:56
Show Gist options
  • Save lucasmaurice/591f5054abca01c5feaca6d3804d99ce to your computer and use it in GitHub Desktop.
Save lucasmaurice/591f5054abca01c5feaca6d3804d99ce to your computer and use it in GitHub Desktop.
<?php
echo "<p>Hello World</p>";
$param = "123";
$command = escapeshellcmd("python3 ./test.py ".$param);
$output = shell_exec($command);
echo $output;
#!/usr/bin/python3
import sys
print ('Number of arguments:', len(sys.argv), 'arguments.')
print ('Argument List:', str(sys.argv))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment