workerman 平滑重啟, 不理解為何無法生效
在start_api.php 中 message 通過Handler接管
$worker->onMessage = [new \Api\Handler, 'Do'];
然后在 \Api\handler
Do
方法內(nèi) 使用 類似
$controller = explode('/', $request->path)[1] ?? '';
/ ** code */
$class = "\\Api\\Func\\{$controller}";
$connection->send(call_user_func([ new $class(), 'main']));
通過fileMonitor監(jiān)控文件變更, 修改 \Api\Func下 文件 時 可以觸發(fā)reload, 但修改的代碼無效
opcache擴展問題