Jump to content

Output data from WORD file (.doc)


gple

Recommended Posts

I have the following code:

$myFile = "testFile.doc";

$fh = fopen($myFile, 'r');

$theData = fread($fh, 5);

fclose($fh);

echo $theData;

 

but it outputs some weird stuff as below:

ÐÏࡱá����������������>��þÿ ���������������*����������,������þÿÿÿ����)���ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì¥Á�q` ��ð¿������������� ���bjbjqPqP������������������ �.��:�:� �������������������������������ÿÿ���������ÿÿ���������ÿÿ�����������������¤�����¤������¤��¤������¤������¤������¤������¤�������������¸������Ü������Ü������Ü������Ü�����è�����¸������÷��¶�����������������������������������������������������������v�����x������x������x������x������x������x��$���­��h����Ž���œ���������������������¤���������������������������������������������������������œ��������������¤������¤����������������������������±�����R������R������R���������"���¤�������������¤�������������v��������������R�������������������������������������������������������������v��������������R��������������R������¤������¤��������������������������������������������������������������R�������������ô����� ‹ªm‰¹Ç��������Ü������"�� ���R��������������v������Ç��0���÷������R������£������,�����£������R������������������������������������������������������������������������������£��������������¤������R��$�����������������R�������������������������������������������������������������������������œ������œ��������������������������������������<����������������������������������������������������������÷������������������������������������������¸������¸������¸��$���Ü������¸������¸������¸������Ü������¸������¸������¸������¤������¤������¤������¤������¤������¤������ÿÿÿÿ�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This

Link to comment
https://forums.phpfreaks.com/topic/57714-output-data-from-word-file-doc/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.