The HttpResponse
PHP 手册

HttpResponse::setFile

(PECL pecl_http >= 0.10.0)

HttpResponse::setFileSet file

说明

static bool HttpResponse::setFile ( string $file )

Set the file to be sent.

Note: Previously calculated or defined ETag and Last-Modified will be recalculated and redefined.

参数

file

the path to the file to send

返回值

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

参见


The HttpResponse
PHP 手册