【发布时间】:2016-06-17 18:10:12
【问题描述】:
我从 stackoverflow 获得了这段代码,它可以在浏览器中显示 word 文档.. 是否可以仅在 localhost 中显示 word 文档.. 尝试此代码后 bcz .. 它只显示“没有可用的预览”。 .
$(document).ready(function() {
$(".word").fancybox({
'width': 600, // or whatever
'height': 320,
'type': 'iframe'
});
});
<a class="word" href="http://docs.google.com/gview?url=http://domain.com/path/docFile.doc&embedded=true">open a word document in fancybox</a>
我的作品
$path="resume/".$row['resume'];
echo "<br /><a class='word' href='http://docs.google.com/gview?url=".$path."&embedded=true'>View Resume</a>";
我给的路径不正确?
【问题讨论】:
-
是
$path = http://domain.com/path/docFile.doc??echo $path查看结果 -
工作正常吗?
http://docs.google.com/gview?url=http://domain.com/path/docFile.doc&embedded=true如果你点击浏览器 -
没有 .. 它只显示没有可用的预览
-
在浏览器中点击这个网址:domain.com/path/docFile.doc,工作吗?
标签: javascript php mysql