简体   繁体   中英

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 contents 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM