List out different arguments in PHP header function?
Answer Posted / sivasankar.p
header —
Send a raw HTTP header
syntax-
void header ( string $string [, bool $replace [,
int $http_response_code ]] )
ex:
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment;
filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
What is a php form?
Explain me soundex() and metaphone()?
What is difference between static and constant?
What is isset php?
What is the difference between php 5 and php 7?
Which of the data type is compound datatype supported by PHP?
Write logic to print Floyd's triangle in PHP?
How do you destroy a session?
What are sql functions?
What is difference between get and post in php?
Which php global variable is used for uploading a file?
Tell me how the result set of mysql be handled in php?
How to convert numbers to strings in php?
How escape single quotes php?
What is the purpose of the php empty function?