Questionaries.org
Login
Register
Questions
Unanswered
Tags
Users
Ask a Question
Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.
Let us know at info@questionaries.org
how to call a header file ?
10
like
0
dislike
how to call a header file ?
asked
2 years
ago
by
anonymous
how
call
header
file
2 Answers
2
like
0
dislike
Best answer
Here is an example of how:
<?php include 'header.php'; ?>
<b>Sub-Page Title</b><p>
Here is the specific content of this page....<br>
<?php include 'footer.php'; ?>
answered
2 years
ago
by
monirulislam
(
51,620
points)
0
like
0
dislike
The header string.
There are two special-case header calls. The first is a header that starts with the string "HTTP/" (case is not significant), which will be used to figure out the HTTP status code to send. For example, if you have configured Apache to use a PHP script to handle requests for missing files (using the ErrorDocument directive), you may want to make sure that your script generates the proper status code.
<?php
header("HTTP/1.0 404 Not Found");
?>
The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless the 201 or a 3xx status code has already been set.
<?php
header("Location:
http://www.example.com/");
/* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
replace
The optional replace parameter indicates whether the header should replace a previous similar header, or add a second header of the same type. By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the same type. For example:
<?php
header('WWW-Authenticate: Negotiate');
header('WWW-Authenticate: NTLM', false);
?>
http_response_code
Forces the HTTP response code to the specified value.
answered
2 years
ago
by
marck_don
(
191,010
points)
Related questions
4
like
0
dislike
1
answer
What is header file?
asked
1 year
ago
by
starcaller
(
24,080
points)
definition
header
file
2
like
0
dislike
1
answer
How Your File Size Can Effect Your Search Engine Efforts
asked
1 year
ago
by
DBA-boss
(
120,990
points)
how
your
file
size
can
effect
search
engine
efforts
10
like
0
dislike
1
answer
how can i edit overall_footer.html file in phpbb?
asked
2 years
ago
by
monirulislam
(
51,620
points)
how
can
edit
overall
footer
html
file
phpbb
8
like
0
dislike
1
answer
how can i edit overall_footer.html file in phpbb?
asked
2 years
ago
by
monirulislam
(
51,620
points)
how
can
edit
overall
footer
html
file
in
phpbb
10
like
0
dislike
1
answer
jQuery Ajax form submit, to call php login script
asked
2 years
ago
by
webmaster
(
25,380
points)
jquery
ajax
form
submit
call
php
login
script