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
Is there an easy way to delete an element from a php array?
Explain about the data types in PHP?
What is mean tnq
How to terminate the execution of a script in PHP?
What does explode do in php?
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
How to Retrieve a Cookie Value?
Which of the delimiter is ASP style?
Where are cookies stored php?
How do I find out the number of parameters passed into function9?
What is $_ post in php?
How to include a file code in different files in php?
What is a definer in mysql?
Explain the ternary conditional operator in php?
How check field is empty or not in php?