略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: EventHttpRequest::sendReplyStart

2024-12-22

EventHttpRequest::sendReplyStart

(PECL event >= 1.4.0-beta)

EventHttpRequest::sendReplyStartInitiate a chunked reply

说明

public EventHttpRequest::sendReplyStart( int $code , string $reason ): void

Initiate a reply that uses Transfer-Encoding chunked .

This allows the caller to stream the reply back to the client and is useful when either not all of the reply data is immediately available or when sending very large replies.

The caller needs to supply data chunks with EventHttpRequest::sendReplyChunk() and complete the reply by calling EventHttpRequest::sendReplyEnd() .

参数

code

The HTTP response code to send.

reason

A brief message to send with the response code.

返回值

没有返回值。

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/eventhttprequest.sendreplystart.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3