PDA

View Full Version : How to run a Bash script via PHP and match the output?



wayne_n_conley
04-04-2018, 02:20 AM
How to run a Bash script via PHP and match the output?

jesica
10-22-2020, 05:04 AM
You do it with exec ie:

$exec = exec('/bin/sh /bin/scripts/myscript.sh ' , $output, $return);

and you can see the output with:

var_dump($output);