header

header -- Send a raw HTTP header

Description

int header ( string string [, bool replace])

 
header(

 
'WWW-Authenticate

 
:








 
NTLM'

 
,false)

 
;








הערה :

הערה :

 
header(

 
"Status

 
:




 
404

 
Not

 
Found"

 
)

 
;







 
header(

 
"Location

 
:

 
http

 
:

 
/

 
/www.example.com

 
/

 
")

 
;

 
/

 
*

 
Redirect

 
browser

 
*

 
/

 
exit

 
;

 
/

 
*

 
Make

 
sure

 
that

 
code

 
below

 
does

 
not

 
get

 
executed

 
when

 
we

 
redirect

 
.

 
*

 
/





הערה :

 
header(

 
"Location

 
:

 
http

 
:

 
/

 
/".$_SERVER['HTTP_HOST'

 
]

 
.dirname($_SERVER['PHP_SELF']

 
)

 
."

 
/

 
".$relative_url)

 
;





 
header(

 
"Expires

 
:




 
Mon

 
,

 
26

 
Jul

 
1997 05:00:00

 
GMT"

 
)

 
;

 
/

 
/

 
Date

 
in

 
the

 
past

 
header("Last-Modified

 
:

 
"

 
.

 
gmdate("D

 
,

 
d

 
M

 
Y

 
H:i:s"

 
)

 
.

 
"

 
GMT")

 
;

 
/

 
/

 
always

 
modified

 
header("Cache-Control

 
:

 
no-store

 
,

 
no-cache

 
,

 
must-revalidate")

 
;

 
/

 
/

 
HTTP

 
/

 
1.1

 
header("Cache-Control

 
:

 
post-check=0

 
,

 
pre-check=0"

 
,

 
false)

 
;

 
header("Pragma

 
:

 
no-cache")

 
;

 
/

 
/

 
HTTP

 
/

 
1.0



הערה :



 
?php

 
header

 
(

 
"Content-type

 
:

 
audio

 
/

 
x-pn-realaudio")

 
;

 
?

 
/

 
/

 
Broken

 
,

 
note

 
the

 
blank

 
line

 
above



הערה :



 
 ?php

 
header(

 
"Content-type

 
:

 
application

 
/

 
pdf")

 
;

 
header("Content-Disposition

 
:

 
attachment

 
;

 
filename=downloaded.pdf")

 
;

 
/

 
*

 
..

 
.

 
output

 
pdf

 
file

 
..

 
.

 
*

 
/



הערה :



הערה :