开发者

PHP and Javascript communication with Terminal

开发者 https://www.devze.com 2023-02-15 01:19 出处:网络
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 display

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

0

精彩评论

暂无评论...
验证码 换一张
取 消