The HttpResponse
PHP 手册

HttpResponse::send

(PECL pecl_http >= 0.10.0)

HttpResponse::sendSend response

说明

static bool HttpResponse::send ([ bool $clean_ob=true ] )

Finally send the entity.

A successful caching attempt will exit PHP, and write a log entry if the INI 设定 http.log.cache is set. See the INI 设定 http.force_exit for what "exits" means.

参数

clean_ob

whether to destroy all previously started output handlers and their buffers

返回值

如果成功则返回 TRUE,失败则返回 FALSE

范例

Example #1 A HttpResponse::send() example

<?php
HttpResponse
::setCache(true);
HttpResponse::setContentType('application/pdf');
HttpResponse::setContentDisposition("$user.pdf"false);
HttpResponse::setFile('sheet.pdf');
HttpResponse::send();
?>

参见


The HttpResponse
PHP 手册