Skip to content

Instantly share code, notes, and snippets.

@ambross
Created July 19, 2017 16:00
Show Gist options
  • Select an option

  • Save ambross/bd8e200753fda9221766b45f7a1769f8 to your computer and use it in GitHub Desktop.

Select an option

Save ambross/bd8e200753fda9221766b45f7a1769f8 to your computer and use it in GitHub Desktop.
<?php
$user = 'hayat';
$pass = '123456';
// don't forget to use double quote
$ret = shell_exec("bash test.sh $user $pass");
// return will print output from that bash script, you may not need to print return if you don't want.
print_r($ret);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment