Current location: Hot Scripts Forums » Programming Languages » PHP » How to read contents of .doc file using file handling


How to read contents of .doc file using file handling

Reply
  #1 (permalink)  
Old 07-19-06, 09:05 AM
atulkul atulkul is offline
New Member
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question How to read contents of .doc file using file handling

Hello ,

I can read contents from .txt file but when i use same for a .doc file it doen't show up the contents as it is but showing some disordered characters.
So how to do for .doc file,plz help me out from this problem
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-19-06, 09:10 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
That's not possible. Doc files are binary. If you open it with notepad or something similar you will see these characters as well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-19-06, 09:38 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
If PHP is running on a Windows operating system you can use COM/OLE to do this - http://us2.php.net/com I know that this can read EXCEL files, but I don't know of any pre-existing PHP class/script that would show you how to do this for WORD files.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP code 2 convert .doc file into .pdf file jeephp PHP 7 11-03-10 05:31 AM
read excel file using either oledbconnection or odbc aparna_rao ASP.NET 1 11-27-05 07:41 AM
Database file or object file is read only, w_inaim ASP 2 09-21-04 03:18 PM
Displaying TEXT file contents to HTML tables Mendo PHP 2 02-18-04 12:19 PM
Upload file to table so ONLY files tied to primary key are displayed in record? grafixDummy PHP 4 12-20-03 05:28 PM


All times are GMT -5. The time now is 01:33 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.