HTTP 函数
PHP Manual

http_send_content_disposition

(PECL pecl_http >= 0.10.0)

http_send_content_dispositionSend Content-Disposition

说明

bool http_send_content_disposition ( string $filename [, bool $inline = false ] )

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

Note: 此函数应与 http_send_data(), http_send_file()http_send_stream() 一同使用。

参数

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.

参见


HTTP 函数
PHP Manual