Home > PHP Framework > Swoole > The difference between swoole and cgi

The difference between swoole and cgi

(*-*)浩
Release: 2019-12-07 09:16:00
Original
1966 people have browsed it

The difference between swoole and cgi

Common Gateway Interface (CGI) is the specification for external programs when the Web server is running. Programs written according to CGI can extend server functions. (Recommended learning: swoole video tutorial)

CGI applications can interact with the browser, and can also communicate with external data sources such as database servers through data APIs, and obtain them from the database servers. data.

After formatting into an HTML document, send it to the browser. You can also put the data obtained from the browser into the database. Almost all servers support CGI, and CGI can be written in any language, including popular C, C++, Java, VB and Delphi. CGI is divided into two types: standard CGI and indirect CGI.

Standard CGI uses command line parameters or environment variables to represent the server's detailed requests, and the server and browser communicate using standard input and output. Indirect CGI, also known as buffered CGI, inserts a buffer program between the CGI program and the CGI interface. The buffer program and the CGI interface communicate using standard input and output.

Swoole is a PHP asynchronous network communication engine for production environments, allowing PHP developers to write high-performance asynchronous concurrent TCP, UDP, Unix Socket, HTTP, and WebSocket services.

Swoole can be widely used in the Internet, mobile communications, enterprise software, cloud computing, online games, Internet of Things (IOT), Internet of Vehicles, smart homes and other fields. Using PHP Swoole as a network communication framework can greatly improve the efficiency of enterprise IT R&D teams.

Swoole is not a framework like Zend Framework, CakePHP, Yii, symfony, ThinkPHP, etc., nor is it a project on par with open source products such as WordPress, Drupal, Discuz, UChome, etc.

Swoole’s goal is to challenge first-class frameworks such as Java frameworks, Ruby On Rails, Python DjangoPylons, etc.

Running environment: Linux Windows Mac FreeBSD Unix

PHP version support: PHP5.3

Supported databases: MS SQL Server, MySQL, IBM DB2, Oracle, Interbase, SQLite, PostgreSQL, ODBC

Supported running modes: Web, Cli command line script, PHP-GTK GUI.

The above is the detailed content of The difference between swoole and cgi. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template