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 changes I have to do in php.ini file for file uploading?
What is php beginner?
Tell me how is it possible to remove escape characters from a string?
What are the advantages of php mysql?
Which methods should be used for sending an email using the variables $to, $subject, and $body?
What is pdo in php why use?
What is the use of offset in mysql?
Which are the best start and end tags to use?
Explain mysql_error().
Can constructor be private in php?
Write a program to swap two numbers using php.
What is the purpose of the '.myd' file extension? What do thes file contain?
What is the difference between client-side and server-side programming?
Which php framework is best for security?
How to genrate report in wordpress cms