PHP header_remove() 함수
예시
특정 헤더 제거:
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header_remove("Pragma");
?>
정의 및 사용
header_remove() 함수는 이전에 header() 함수로 설정한 HTTP 헤더를 제거합니다.
통사론
header_remove(headername)
매개변수 값
Parameter | Description |
---|---|
headername | Optional. Specifies a header name to be removed. If omitted, all previously set headers are removed |
기술적 세부 사항
반환 값: | 아무것도 |
---|---|
PHP 버전: | 5.3+ |
더 많은 예
예시
이전에 설정한 모든 헤더를 제거합니다.
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header_remove();
?>
❮ PHP 네트워크 참조