<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Send Content-Disposition</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.http-redirect.html">http_redirect</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.http-send-content-type.html">http_send_content_type</a></div> <div class="up"><a href="ref.http.html">HTTP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.http-send-content-disposition" class="refentry"> <div class="refnamediv"> <h1 class="refname">http_send_content_disposition</h1> <p class="verinfo">(PECL pecl_http >= 0.10.0)</p><p class="refpurpose"><span class="refname">http_send_content_disposition</span> — <span class="dc-title">Send Content-Disposition</span></p> </div> <div class="refsect1 description" id="refsect1-function.http-send-content-disposition-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>http_send_content_disposition</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span> [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$inline</code><span class="initializer"> = false</span></span> ] )</div> <p class="para rdfs-comment"> Send the <em>Content-Disposition</em>. The <em>Content-Disposition</em> header is very useful if the data actually being sent came from a file or something similar, that should be "saved" by the client/user (i.e. by the browser's "Save as..." popup window). </p> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">This function should be used in conjunction with <span class="function"><a href="function.http-send-data.html" class="function">http_send_data()</a></span>, <span class="function"><a href="function.http-send-file.html" class="function">http_send_file()</a></span> and <span class="function"><a href="function.http-send-stream.html" class="function">http_send_stream()</a></span>.</span></p></blockquote> </div> <div class="refsect1 parameters" id="refsect1-function.http-send-content-disposition-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">filename</code></em></span> <dd> <p class="para"> the file name the "Save as..." dialog should display </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">inline</code></em></span> <dd> <p class="para"> if set to <strong><code>TRUE</code></strong> and the user agent knows how to handle the content type, it will probably not cause the popup window to be shown </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.http-send-content-disposition-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 seealso" id="refsect1-function.http-send-content-disposition-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.http-send-data.html" class="function" rel="rdfs-seeAlso">http_send_data()</a> - Send arbitrary data</span></li> <li class="member"> <span class="function"><a href="function.http-send-file.html" class="function" rel="rdfs-seeAlso">http_send_file()</a> - Send file</span></li> <li class="member"> <span class="function"><a href="function.http-send-stream.html" class="function" rel="rdfs-seeAlso">http_send_stream()</a> - Send stream</span></li> <li class="member">the <a href="class.httpresponse.html" class="link"> <a href="class.httpresponse.html" class="classname">HttpResponse</a></a> class if you are using PHP 5.1.0 and above</li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.http-redirect.html">http_redirect</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.http-send-content-type.html">http_send_content_type</a></div> <div class="up"><a href="ref.http.html">HTTP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>