Entry
Can I return other file formats (like Word, Excel, etc) using PHP?
Apr 29th, 2001 20:19
Philip Olson, Nathan Wallace,
As long as you know how to output data in those formats that is easy.
All you need to do is to set the Content-Type: header to the respective
MIME type of the output format. For instance for the Excel format you
would do:
Header("Content-Type: application/vnd.ms-excel");
If you want to set the file name of outputted data you may want to do as
follows:
Header("Content-Location: ". $file_name);
Header("Content-Disposition: filename=". $file_name);
Be sure to view this tutorial (and user comments) :
COM Functions in PHP4 (Windows) :
------------------------------------------------------
http://phpbuilder.com/columns/alain20001003.php3