PHP 클래스 JBZoo\Utils\Http

파일 보기 프로젝트 열기: jbzoo/utils 1 사용 예제들

공개 메소드들

메소드 설명
download ( string $filename ) : boolean Transmit headers that force a browser to display the download file dialog.
getHeaders ( ) : array Get all HTTP headers
nocache ( ) : boolean Sets the headers to prevent caching for the different browsers.
utf8 ( string $content_type = 'text/html' ) : boolean Transmit UTF-8 content headers if the headers haven't already been sent.

메소드 상세

download() 공개 정적인 메소드

Cross browser compatible. Only fires if headers have not already been sent.
public static download ( string $filename ) : boolean
$filename string The name of the filename to display to browsers
리턴 boolean

getHeaders() 공개 정적인 메소드

Get all HTTP headers
또한 보기: https://github.com/symfony/http-foundation/blob/master/ServerBag.php
public static getHeaders ( ) : array
리턴 array

nocache() 공개 정적인 메소드

Different browsers support different nocache headers, so several headers must be sent so that all of them get the point that no caching should occur
public static nocache ( ) : boolean
리턴 boolean

utf8() 공개 정적인 메소드

Transmit UTF-8 content headers if the headers haven't already been sent.
public static utf8 ( string $content_type = 'text/html' ) : boolean
$content_type string The content type to send out
리턴 boolean