mac下用php读取word文档

来源:互联网 发布:windows开放ssh 端口 编辑:程序博客网 时间:2024/06/05 03:09

借鉴于https://phperzh.com/articles/1950

在mac下,读取word文档步骤:

1 brew install antiword  安装完后会有路径,如/usr/local/Cellar/antiword/0.37/bin/antiword

2 sudo chmod 777 /usr/local/Cellar/antiword/0.37/bin/antiword  

3 读取  $content = shell_exec('/usr/local/bin/antiword -m UTF-8.txt '.$filename);  

原创粉丝点击