I am trying to run a bash script from an html file using php. I've read this question (how to run a .sh file from php?) and followed it exactly but cannot seem to get it to work.
I have two files in my downloads folder on my mac. These are the file names and their content:
hello.sh
echo hello world
test.html
<?php
echo shell_exec('sh /Users/fred/downloads/thing.sh');
?>
I ran this command in command line while in the downloads folder:
open test.html
This resulted in a blank page being opened in chrome while I was expecting to get a page with "hello word" in it.
Thanks for the help.