(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
。