starting gnu screen using php
I want to do a script to start an application using screen in php. The command to start the server is "screen ./tserver" in directory "/home/servers/". Anyone knows how I can exec that command using php. Thanks.
|
Apparently, you just need to run:
exec (screen ./tserver); http://php.net/manual/en/function.exec.php I haven't used PHP for many years, so I had to look it up. May I give you some advice? When I used PHP, a long time ago, I was a computer/linux/programming newbie and didn't know any better. PHP was the only language that I knew, so I ventured into "shell scripting" with PHP. It was very good practice, but I eventually realized that it's hardly a good idea. There are many languages a lot more suitable to such tasks. Happy coding! |
so to start an application I use screen -d -m ./tserver and I made exec('screen -d -m ./tserver'); and tried with shell_exec too but it isn't working. When I replace screen -d -m ./tserver with exec(mkdir ('folder'));, it works.
|
All times are GMT -5. The time now is 04:17 PM. |