doucha7329 2015-04-28 11:13
浏览 81

如何使用PHP将最常用的文件(pdf,doc,docx,xl​​s,...)显示到浏览器中?

I need to display a (pdf,doc,docx,txt) documents inside an php web form with the ability to select a part of the document content and do some processing on it in the right click (like saving the selected content to DB)?

I try this way :-

<iframe src="http://docs.google.com/viewer?url=<?=urlencode($docx)?>&embedded=true" width="600" height="780" style="border: none;"></iframe>

But is show me as html

  • 写回答

2条回答 默认 最新

  • dongza1708 2015-04-28 11:51
    关注

    Two things you can do:

    1. Just link to the .pdf/etc. location on your server

    2. Save the image of it as a .jpg and display that then put a link to download the pdf/whatever

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度