Join
Sign in
Search Options
Search Everything
Search Development Tools
Home
Blog
Resources
Forums
About Open XML
More ...
Home
»
Forums
»
Development Tools
»
Other
»
how to read .docx file in PHP
how to read .docx file in PHP
Development Tools
Discussions about working with Open XML using a wide range of development tools
Get this RSS feed
Details
0
Replies
0
Subscribers
Posted
over 2 years ago
Options
Subscribe via RSS
Share this
Other
how to read .docx file in PHP
rated by 0 users
This post has
0 Replies |
0
Followers
chittivenureddy
5
Posted by
chittivenureddy
on
Fri, May 21 2010 8:36 AM
rated by 0 users
Post Points: 5
how to read .docx file in PHP
how to read .docx file in PHP
i writes one way but it give junk output
$filename='myfile.docx';
$fileHandle = fopen($filename, "rb");
$line = @fread($fileHandle, filesize($filename));
$lines = explode(chr(0x0D),$line);
$outtext = "";
foreach($lines as $thisline)
{
$pos = strpos($thisline, chr(0x00));
if (($pos !== FALSE)||(strlen($thisline)==0))
{
} else {
$outtext .= $thisline." ";
}
}
$outtext = preg_replace("/[^a-zA-Z0-9\s\,\.\-\n\r\t@\/\_\(\)]/","",$outtext);
echo $outtext //Gino/1Af3TI SWY Q,e(4DG7F.urxCs_q4hJ HFRpRya 3F8IP)wzJj4evPmgdg1T)tJ dXiJ(x( I_TS 1EZBmU/xYy5g/GMGeD3Vqq8K)fw9 xrxwrTZaGy8IjbRcXI u3KGnD1NIBs RuKV.ELM2fi V vlu8zH (W )6-rCSj id DAIqbJx6kASht(QpmcaSlXP1Mh9MVdDAaVBfJP8 AVf mA E l(0W8KqI VRzbCp8jY08qFG6rHZy -_ obl r5
can any one help me, thanks in advance
Page 1 of 1 (1 items)