baker95935

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

其实是现在一个linux下的扩展

 1 先安装  antiword

yum antiword install

2 写测试php代码

header("Content-type: text/html; charset=utf-8");  
  
$filename = '1.doc';  
$content = shell_exec('antiword -mUTF-8 '.$filename);   
  
echo '<pre>';  
print_r ($content);  
echo '</pre>';  

可以输出 正常 

 

有个不错的phpword 就是要安装的扩展比较多,有空的可以试试 ,这个更强大

 

posted on 2017-08-11 15:35  baker95935  阅读(804)  评论(0编辑  收藏  举报