php通过baihui网API实现读取word文档并展示

yipeiwu_com6年前PHP代码库

项目中遇到一个小问题,想实现php 如何读取word文档,并将其内容原样显示

可以 使用API 可以看看baihui.com 的写写应用 的API

申请一个 APPKEY 就能使用,你可以看看 ... 对免费版本有限制

比如 excel 支持,可以参考我这个 appkey是我申请的,可以使用吧 ...
保存成本地的一个html文件 打开后直接使用

word 的类似

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试百会格格远程API</title>
</head>
<body>
<form action="http://gege.baihui.com/remotedoc.im?apikey=079c6475174c7a46351260ed35e54ecd&output=editor" target="_self" enctype="multipart/form-data" method="post">
上传文件: <input type="file" name="content" site="38"/>
<input type="hidden" name="filename" value="my.xls,my.xlsx" />
<input type="hidden" name="saveurl" value="http://vai.com" />
<input type="hidden" name="id" value="21012145" />
<input type="hidden" name="format" value="xlsx" />
<input type="hidden" name="persistence" value="true" />
<input type="submit" value="提交" />
</form>
</body>
</html>

以上所述就是本文的全部内容了,希望大家能够喜欢。

相关文章

探讨PHP中OO之静态关键字以及类常量的详解

闲着没事随便找了点PHP的关于OO的点资料看看,访问控制修饰符,self,parent,const,static几个关键字,箭头操作符(书上也这么叫..即“->”),范围解析操作符...

php 运行效率总结(提示程序速度)

1,在函数中,传递数组时 使用 return 比使用 global 要高效 比如 function userloginfo($usertemp){ $detail=explode("|"...

PHP字典树(Trie树)定义与实现方法示例

PHP字典树(Trie树)定义与实现方法示例

本文实例讲述了PHP字典树(Trie树)定义与实现方法。分享给大家供大家参考,具体如下: Trie树的概念(百度的解释):字典树又称单词查找树,Trie树,是一种树形结构,是一种哈希树的...

php简单定时执行任务的实现方法

本文实例讲述了php简单定时执行任务的实现方法。分享给大家供大家参考。具体实现方法如下: <?php ignore_user_abort(); set_time_lim...

PHP单元测试利器 PHPUNIT深入用法(二)第1/2页

PHP单元测试利器 PHPUNIT深入用法(二)第1/2页

1、markTestSkipped和markTestIncomplete   在phpunit中,有两个有用的方法markTestSkipped和markTestIncomplete。...