swoole is an asynchronous, parallel, high-performance network communication engine for PHP. It is written in pure C language and provides an asynchronous multi-threaded server in PHP language and an asynchronous TCP/UDP network client. , asynchronous MySQL, asynchronous Redis, database connection pool, AsyncTask, message queue, millisecond timer, asynchronous file reading and writing, asynchronous DNS query.
Swoole has built-in Http/WebSocket server/client and Http2.0 server. (Recommended learning: swoole video tutorial)
Go to the GitHub homepage to download the Swoole extension source code, address: https://github.com/swoole/swoole-src After downloading, follow the standards The PHP extension compilation method is compiled and installed.
Usually
phpize ./configure make install
After compilation and installation, modify php.ini and add extension=swoole.so to enable the swoole extension. It can also be loaded dynamically through dl('swoole.so'). It is recommended to modify php.ini.
Download the swoole_framework source code, address: https://github.com/swoole/framework. Just place it in your workspace directory.
swoole_framework is PHP code, you only need to require/include, no compilation and installation are required.
Configuration./configure As above, if your environment has multiple php environments, you should find the current environment using your
find / -iname php-config ./configure --with-php-config= 上边的查找结果就行
make make install
Then modify the php.ini file and add extension=swoole.so
The above is the detailed content of How to connect swoole with PHP. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
