update : 2015.11.03
php.shukuma.com검색:
|
header(PHP 4, PHP 5) header — Send a raw HTTP header 설명
void header
( string
$string
[, bool $replace = true
[, int $http_response_code
]] )header() is used to send a raw HTTP header. See the » HTTP/1.1 specification for more information on HTTP headers. Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include, or require, functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
<html> 인수
반환값값을 반환하지 않습니다. 변경점
예제
Example #1 Download dialog If you want the user to be prompted to save the data you are sending, such as a generated PDF file, you can use the » Content-Disposition header to supply a recommended filename and force the browser to display the save dialog.
<?php
Example #2 Caching directives PHP scripts often generate dynamic content that must not be cached by the client browser or any proxy caches between the server and the client browser. Many proxies and clients can be forced to disable caching with:
<?php
주의
참고
|