downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

HttpResponse::setContentType> <HttpResponse::setCacheControl
[edit] Last updated: Fri, 14 Jun 2013

view this page in

HttpResponse::setContentDisposition

(PECL pecl_http >= 0.10.0)

HttpResponse::setContentDispositionSet content disposition

说明

static bool HttpResponse::setContentDisposition ( string $filename [, bool $inline = false ] )

Set the Content-Disposition. 当实际被发送的来自文件或类似东西的数据,要被客户端/用户(例如,浏览器的“另存为...”弹出窗口)“保存”时,Content-Disposition 头是十分有用的。

参数

filename

the file name the "Save as..." dialog should display

inline

if set to true and the user agent knows how to handle the content type, it will probably not cause the popup window to be shown

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE

参见



add a note add a note User Contributed Notes HttpResponse::setContentDisposition - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites