2
A
回答
0
對於Windows,您可以使用API函數來檢索鍵盤狀態。調用Win32 API函數的方法在http://de.php.net/manual/en/ref.w32api.php中描述。您需要調用的API函數是GetKeyboardState,其中結果存儲在數組中。
2
你想要做什麼標準輸入讀取: http://linux.about.com/library/cmd/blcmdl3_stdin.htm
下面是如何做到這一點在PHP教程: http://codegolf.com/boards/conversation/view/129
希望幫助!
編輯:發現該回答的問題這更好:PHP CLI: How to read a single character of input from the TTY (without waiting for the enter key)?
3
相關問題
- 1. while循環是否會停止執行?
- 2. 停止並繼續執行For循環
- 3. SSH for循環執行命令腳本
- 4. 執行while或for循環後沒有代碼執行C
- 5. PHP while循環 - 不停止
- 6. PHP while()停止循環
- 7. 在While循環中執行PHP CURL
- 8. bash腳本在while循環中停止執行 - 爲什麼?
- 9. PHP while while循環未執行
- 10. PHP while while循環執行時間
- 11. Golang:我如何停止從循環外執行for循環?
- 12. 在for或while循環中停止sql插入
- 13. 如何在while循環中只執行一個按鍵? (PyWin32)
- 14. 從外部停止運行while循環
- 15. bash while循環不會自行停止
- 16. 我的JMeter腳本在while循環後停止執行
- 17. while循環在for循環後不執行
- 18. PHP for循環while while循環
- 19. For循環在Windows命令行
- 20. while循環或動態執行
- 21. 如何在執行時停止for循環
- 22. 在WAMP環境中執行php命令
- 23. 如何停止for循環運行?
- 24. PHP while循環未正確執行
- 25. For循環中的停止按鈕
- 26. Night循環執行命令for循環內循環順序不正確
- 27. 做while循環,如果外鍵等於主鍵,則執行while循環
- 28. 使用for或while循環
- 29. 停止for循環
- 30. 如何在bash for循環內執行psql命令
謝謝,但我正在尋找方式在命令行來做到這一點的LINUX PHP腳本 – Simon