Clase HttpResponse
PHP Manual

HttpResponse::setContentDisposition

(PECL pecl_http >= 0.10.0)

HttpResponse::setContentDispositionSet content disposition

Descripción

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

Set the Content-Disposition. El header Content-Disposition es muy útil si los datos que se están enviando provienen de un archivo o algo similar, que debería ser "guardado" por el cliente/usuario (por ej., a través de la opción "Guardar cómo" del navegador).

Parámetros

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

Valores devueltos

Devuelve TRUE en caso de éxito o FALSE en caso de error.

Ver también


Clase HttpResponse
PHP Manual