943,912 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 3308
  • PHP RSS
Jul 26th, 2005
0

Generating .doc reports

Expand Post »
We have a linux server and windows clients.
Our webbased accounting system is soppused to make reports in different formats like .DOC.
The system is written in PHP. How can we generate that format?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
om1d_h is offline Offline
7 posts
since Jul 2005
Jul 26th, 2005
0

Re: Generating .doc reports

Easy! just this header before before your output (can be HTML formated!)
[PHP]header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
header("Content-type: application/msword");
header('Content-Disposition: attachment; filename="myFileName.doc";');[/PHP]
Reputation Points: 11
Solved Threads: 0
Junior Poster in Training
senexom is offline Offline
54 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Displaying News Articles
Next Thread in PHP Forum Timeline: File upload problems





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC