PHP and Javascript communication with Terminal
I was wondering if there is a way by using PHP and Javascript (+AJAX) so as to have a box inside of which the content开发者_Python百科s of the terminal screen of a linux system are going to be displayed. I need this feature because I am trying to make an html terminal for a website I am building, where the user can run it's programs interactively through the internet.
This is possible. Just let jQuery (or any other JS library, or just JS) perform an AJAX-request to a PHP script that runs system commands, like (shell_)exec. That way you can retreive the output and show it in a textbox!
http://api.jquery.com/jQuery.post/
http://nl2.php.net/shell_exec
精彩评论