update : 2015.11.03
php.shukuma.com

검색:
 
 
Set content disposition

HttpResponse::setContentDisposition

(PECL pecl_http >= 0.10.0)

HttpResponse::setContentDispositionSet content disposition

설명

static bool HttpResponse::setContentDisposition ( string $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를 반환합니다.

참고