Php 我可以将excel和word文档从base64编码数据显示到网页吗?
我正在用php zend框架开发一个应用程序 我有很多文件都是用base64编码的字符串 我可以使用object标记、embed标记或任何其他方法在php网页上显示该文档吗 我使用以下代码显示pdf文档和图像:Php 我可以将excel和word文档从base64编码数据显示到网页吗?,php,html,object-tag,Php,Html,Object Tag,我正在用php zend框架开发一个应用程序 我有很多文件都是用base64编码的字符串 我可以使用object标记、embed标记或任何其他方法在php网页上显示该文档吗 我使用以下代码显示pdf文档和图像: For PDFs : <embed width="100%" height="100%" type="application/pdf" src="data:application/pdf;base64,<?php echo $documentdata; ?>">&
For PDFs :
<embed width="100%" height="100%" type="application/pdf" src="data:application/pdf;base64,<?php echo $documentdata; ?>"></embed>
For Images :
<embed width="100%" height="100%" type="image/jpeg" src="data:image/jpeg;base64,<?php echo $vv['OLEObject']; ?>"></embed>
对于PDF:
您是否也在使用“嵌入”来表示word文档?尝试使用对象,如下所示:
<object data="file:///C|/myfile.doc" type="application/msword" style="width:100%;height:100%;"></object>
这对于将base64 world内容显示为html预览是不可能的。
但是你只能下载。但是我没有物理文件。我有base64编码字符串的文档。如何向对象提供base64数据?您找到答案了吗?我需要显示xls文件基地64编码太多