get output of shell command executed via shell_exec code example Example: run shell script from php file echo shell_exec('sh /home/scripts/fix-perm.sh');