©
This document uses PHP Chinese website manual Release
(PECL pecl_http >= 0.10.0)
HttpResponse::setContentDisposition — Set content disposition
$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
。