PHP function
content_type
Description
Write out the HTTP header Content-Type.
Examples
[% content_type("text/vcard", "attachment", "contacts.vcf"); %]
[% content_type("text/csv"); %]
[% content_type("csv"); %]
[% content_type("pdf", "inline", "Report.pdf"); %]
|
Parameters3
Coding name |
type
|
Description |
The content type: Either a shorthand or the exact content-type.
|
Position |
1
|
Type |
String(Primitive type)
|
Comments |
Defined shorthands: csv, pdf, sql, jpg, zip, plain.
|
Coding name |
disposition
|
Position |
2
|
Type |
String(Primitive type)
|
Default value |
By default the Content-Disposition header is omitted.
|
Coding name |
filename
|
Description |
Filename for saving the resource to the filesystem of the browser.
|
Position |
3
|
Type |
String(Primitive type)
|
Default value |
No filename is used.
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.