I am trying to read content of Word file. I used code below but it is giving warning as Warning: fread() [function.fread]: Length parameter must be greater than 0
$filename=$file->getFilename();
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if($ext=='docx')
{
$fname = fopen($filename, 'r');
if (is_readable($filename))
{
$content = fread($fname,filesize($filename));
echo $content;
}
else
{
echo 'The file is not readable.';
}
fclose($fname);
}