Why am I not able to execute this bash script using php? I have tried
exec() as well as
<?php $old = getcwd(); echo $old; chdir($old); $message=exec("a.sh"); print_r($message); ?>
#!bin/bash echo "i am a" > /opt/lampp/htdocs/a.txt echo "Done"
I have tried
chdir as suggested here, as well as I have checked my
php.ini, it doesn't have anything. I have also checked other questions, but none seem to solve my problem.