# my-php-srv **Repository Path**: dz/my-php-srv ## Basic Information - **Project Name**: my-php-srv - **Description**: No description available - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-19 - **Last Updated**: 2024-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ##使用 ``` composer require myphps/my-php-srv ``` ##示例1 通过 composer的autolad ```php #!/usr/bin/env php run($argv); ``` ##示例2 或直接通过自带Load.php载入 ```php #!/usr/bin/env php run($argv); ``` >conf.php是myphp的配置文件 ##Workerman Event onWorkerStart|onWorkerReload(Workerman\Worker $worker) onConnect|onClose|onBufferFull|onBufferDrain(Workerman\Connection\TcpConnection TcpConnection $connection) onMessage(Workerman\Connection\TcpConnection TcpConnection $connection, string|Workerman\Protocols\Http\Request $data) onError(Workerman\Connection\TcpConnection $connection, $code, $msg) ##Swoole Event onWorkerStart|onWorkerStop(Swoole\Server $server, int $workerId) onWorkerError(Swoole\Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal) onConnect|onClose(Swoole\Server $server, int $fd, int $reactorId) onTask(Swoole\Server $server, int $task_id, int $src_worker_id, mixed $data) tcp onReceive(Swoole\Server $server, int $fd, int $reactorId, string $data) udp onPacket(Swoole\Server $server, string $data, array $clientInfo) ws onMessage(Swoole\WebSocket\Server $server, Swoole\WebSocket\Frame $frame) http onRequest(Swoole\Http\Request $request, Swoole\Http\Response $response)