How to execute home directory shell script file in php

Posted by vvr on Super User See other posts from Super User or by vvr
Published on 2012-06-26T08:38:28Z Indexed on 2012/06/26 9:18 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

How to execute /home/scripts/test.sh file in php

Previously i have placed 'test.sh' file in the /usr/bin and calling in my php file like this

exec('test.sh ' . escapeshellarg($testString)); 

But for security reasons i moved .sh file to /home/scripts directory and in my php i am calling like this

exec('/home/scripts/test.sh ' . escapeshellarg($testString)); 

But it is not working now.

Please suggest me how to achieve this.

© Super User or respective owner

Related posts about linux

Related posts about unix