Commit | Line | Data |
---|---|---|
1 | <?php\r | |
2 | \r | |
3 | function readline() {\r | |
4 | $fp = fopen("php://stdin","r");\r | |
5 | $line = fgets($fp, 1000);\r | |
6 | fclose($fp);\r | |
7 | return $line;\r | |
8 | }\r | |
9 | \r | |
10 | while(1){\r | |
11 | print ("\nHARVIE's CMDLine:\n");\r | |
12 | $cmd = ("");\r | |
13 | $cmd = trim(readline());\r | |
14 | if ( $cmd != "" ){\r | |
15 | system ($cmd);\r | |
16 | } else {\r | |
17 | while(1){\r | |
18 | $cmd = trim(readline());\r | |
19 | }\r | |
20 | }\r | |
21 | }\r | |
22 | \r | |
23 | ?>\r |