directory

  • Configuration Details (completed)

  • Asynchronous tasks

  • The Socket service

  • Description of Socket events (completed)

  • Event listeners

  • Timing task

  • Use and configuration of high-performance in-memory databases

  • Nginx and Apache Reverse proxy configuration (completed)

preface

Toptink \ think-Swoole has been expanding for a long time, looking for a lot of documents, half of which are paid, and half of which are written casually. Let’s sort out some of the pitfalls of using new and novice users.

Payment document www.kancloud.cn/zhangqi/thi… This author’s writing is ok. Some do not know the place or refer to the author to deal with

Swoole4 document installation

wiki.swoole.com/#/

If there is any doubt in the process of use, we should consult more official documents, blindly Baidu is meaningless. Let alone new knowledge. The processing of the post is also poor

Install the extension

First follow the instructions on the Swoole website to install the Swoole extension and then use it; Install TP6 will not write oh

composer require topthink/think-swoole
Copy the code

Method of use

# start PHP think swoole # restart PHP think swoole restart PHP think swoole stopCopy the code

Matters needing attention

  1. Die and exit cannot be used in programs
  2. Want to abort the program using the TP6 helper function halt()
  3. No longer runs on Windows (basic knowledge)
  4. Disabling global variables

recommended

TP6 mall + UNI-app compatible with H5 and small programs, interested can understand