Communicate between Shell and PHP? -
im going write php script should following:
- create user
- check for, download , install packages
- download files wget
- move files
- set permissions
- start applications screen
- stop screen session
i don't want use default www-data user - how can exec cmd user?
whats best way php on debian/ubuntu ?
maybe run .sh file (+ params) shell_exec()
?
depending upon need can use .sh
exec
too
if have lots of commands under single action should prefer shell script
for 1 liners shell_exec
works efficiently.
for more reference (regarding syntax) visit documentation
Comments
Post a Comment