swoole_http_response->sendfile

发送文件到浏览器。

function swoole_http_response->sendfile(string $filename);

使用示例

$response->header('Content-Type', 'image/jpeg');
$response->sendfile(__DIR__.$request->server['request_uri']);