File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ $vega->handle('/html', function (Mix\Vega\Context $ctx) {
345345
346346## 静态文件处理
347347
348- 基于 ` sendfile ` 零拷贝
348+ 基于 ` sendfile ` 零拷贝,不支持在 ` PHP-FPM ` 中使用
349349
350350``` php
351351$vega = new Mix\Vega\Engine();
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ composer require mix/vega
3333
3434## Quick start
3535
36- Swoole is used in multiple (asynchronous) processes
36+ - Swoole is used in multiple (asynchronous) processes
3737
3838``` php
3939<?php
@@ -66,7 +66,7 @@ $http->set([
6666]);
6767```
6868
69- Swoole is used in a single process (coroutine)
69+ - Swoole is used in a single process (coroutine)
7070
7171``` php
7272<?php
@@ -84,7 +84,7 @@ Swoole\Coroutine\run(function () {
8484});
8585```
8686
87- Used in the WorkerMan
87+ - Used in the WorkerMan
8888
8989``` php
9090<?php
@@ -101,6 +101,19 @@ $http_worker->count = 4;
101101Workerman\Worker::runAll();
102102```
103103
104+ - Used in PHP-FPM
105+
106+ ``` php
107+ <?php
108+ require __DIR__ . '/vendor/autoload.php';
109+
110+ $vega = new Mix\Vega\Engine();
111+ $vega->handle('/hello', function (Mix\Vega\Context $ctx) {
112+ $ctx->string(200, 'hello, world!');
113+ })->methods('GET');
114+ $vega->run();
115+ ```
116+
104117Request to test
105118
106119~~~
@@ -323,7 +336,7 @@ $vega->handle('/html', function (Mix\Vega\Context $ctx) {
323336
324337## Static file handling
325338
326- Based on ` sendfile ` zero copy
339+ Based on ` sendfile ` zero copy, not supported in ` PHP-FPM `
327340
328341``` php
329342$vega = new Mix\Vega\Engine();
You can’t perform that action at this time.
0 commit comments