问题
Windows, cygwin.
I've successfully created a screen session and used it how i would like from a command prompt:
screen -S remote
then can stuff it like so: screen -S remote -X stuff blah
and everthing works just peachy. However, I am trying to do the stuffing from a PHP script. <?php exec("screen -S remote -X stuff blah"); ?>
to no avail.
It seems that PHP can only use screen with certain options. <?php exec("screen -ls"); ?>
works as expected, listing the current screen sessions, but i cannot stuff anything into a session :(
I am even able to create a session through PHP, but am never able to "use" the session. I've even tried screen -S remote -p 0 stuff blah
Anyone have any ideas?
回答1:
after a bit of experimenting, i managed to successful stuff.
exec("start screen -S remote -X stuff blah");
来源:https://stackoverflow.com/questions/9882438/cygwin-screen-session-problems-through-php