問題描述
我想用 php 和 jquery 或 ajax 編寫一個終端"模擬器.
I want to program a "Terminal" emulator in php and jquery or ajax.
我的意圖不是執(zhí)行真正的終端命令,我想創(chuàng)建類似 echo 的命令并將結(jié)果檢索到 TextArea,或者創(chuàng)建類似 newuser 的命令并打開 jquery 對話框或網(wǎng)頁.有沒有辦法開發(fā)這個東西?
My intention it's not to execute real terminal commands, I want to make commands like echo and retrieve me the results to an TextArea, or make commands like newuser and open me a jquery dialog or a webpage. Is there any way to do develop this thing?
我想要的是一個文本區(qū)域,我可以在其中獲取響應(yīng)和一個文本輸入字段,我可以在其中放置命令.需要做的功能是調(diào)用一個 php 文件,它管理文本字段上的數(shù)據(jù)輸入,比較并執(zhí)行一些操作,例如簡單的回聲或擲骰子.我不想管理系統(tǒng).感謝大家
The thing i want is a text area where i get the responses and a text input field where i put the commands. The function that needs to do is make a call to a php file where it manages the data input on the text field, compare and do some actions, like a simple echo or a dice rolling. I don't want to manage the system. Thanks to all
推薦答案
有幾個遠程(ajax)shell,它們模擬一個shell并將命令轉(zhuǎn)發(fā)到服務(wù)器上的真實shellHTTP(S):
There are several remote (ajax) shells, which emulate a shell and forward the commands to to the real shell on the server via HTTP(S):
- http://antony.lesuisse.org/software/ajaxterm/
- http://www.squarefree.com/shell/shell.html
- http://en.wikipedia.org/wiki/Web-based_SSH
這篇關(guān)于PHP終端模擬器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!