RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1422 | Replies: 1
Reply
Join Date: Jul 2005
Posts: 7
Reputation: om1d_h is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
om1d_h om1d_h is offline Offline
Newbie Poster

Generating .doc reports

  #1  
Jul 26th, 2005
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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Location: Seattle, WA
Posts: 53
Reputation: senexom is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
senexom's Avatar
senexom senexom is offline Offline
Junior Poster in Training

Re: Generating .doc reports

  #2  
Jul 26th, 2005
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]
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:45 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC