Home  >  Article  >  Backend Development  >  Adding a shell script console to the web page is probably how to achieve it, thank you

Adding a shell script console to the web page is probably how to achieve it, thank you

WBOY
WBOYOriginal
2016-08-04 09:21:252386browse

https://github.com/nickola/web-console/releases/

Adding a shell script console to the web page is probably how to achieve it, thank you

Add shell script console to the web

I roughly know the background situation, but how to implement this interface, and the format of the data displayed after executing the command is similar to the console in Linux

Reply content:

https://github.com/nickola/web-console/releases/

Adding a shell script console to the web page is probably how to achieve it, thank you

Add shell script console to the web

I roughly know the background situation, but how to implement this interface, and the format of the data displayed after executing the command is similar to the console in Linux

https://github.com/nickola/web-console/blob/master/src/webconsole.main.php#L9-L32

This library encapsulates http://php.net/manual/zh/function.proc-open.php


Update for the subject:

Terminal is implemented using https://github.com/jcubic/jquery.terminal

exec, system,..., these can all execute shell commands. You can make an ajax request, return the command result, and then adjust the style yourself

The shell in the web is not a real shell. It accepts commands and filters them through back-end processing, and then uses exec call in php
Interface implementation:
1. Front-end drawing
2. Flash animation

1. Can only simulate styles
2. Exec and other methods of calling shell scripts are used to operate
3. Complete

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn