gally Posted December 31, 2011 Share Posted December 31, 2011 Hi guys, First of all... HAPPY NEW YEAR TO EVERYONE Well, Ive some scripts which works as they are expected to do when used with the browser. Now I would like to use them within a terminal (rxvt). I made some modifications and everything is ok but Im acing a "big" problem with the forms. Dont know how to handle the action tag. Im sure that the code will explain everything. echo "1 - AA 2 - BB 3 - CC 4 - DD\n\n"; $handle = fopen ("php://stdin","r"); $inp = fgets($handle); switch ($inp){ case 1: exec('php /foo/foo1/foo2/myfile.php'); break; ..... default: echo "\033[1;31m \n\n\n\n WRONG INPUT\n\n\n\033[00m"; die(); } I correctly read the input ($inp) but when its timie to execute the option1 I get the prompt. Any idea? Thank you in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.