【问题标题】:Embed ppt file in webpage在网页中嵌入 ppt 文件
【发布时间】:2015-05-29 08:52:51
【问题描述】:

我目前在网页内打开 .ppt/.pptx 文件时遇到问题。我目前在一个文件夹中拥有所有“上传”的文件,并且能够在该文件夹中打开 .html/.txt 文件,但不能打开 .ppt/.pptx。每当我尝试时,都会弹出一个新窗口并开始运行 Windows Uploader。

<?php
$target_dir = "C:\Apache\htdocs\upload\\";
$target_file = $_FILES['file']['name'];
  ?>

<iframe src = "upload/"<?php echo $target_file; ?>"  name = "iframe_s" id = "download" style = "display:none"></iframe>

  <a href = "upload/"<?php echo $target_file; ?>" target = "iframe_s">Click here to view files</a>

在上面的代码中,我尝试列出文件夹中的所有文件,目标是用户可以单击其中一个文件,然后该文件将在网页内打开。我现在遇到的主要问题是让程序分别将不同的 .ppt url 附加到不同的文件。

提前谢谢你!

【问题讨论】:

  • @Nepal12 感谢您的回复。对不起,我真的是一个新手。所以现在我有一个本地文件夹,其中包含我想要嵌入的所有 .ppt 文件,并且随着用户向该文件夹上传更多内容,将会更多。如何使用 HTML/PHP 将它们上传到 Google Doc,然后将不同的 Google Doc url 嵌入到每个文件中?

标签: php html upload embed webpage


【解决方案1】:

对于您的问题“如何上传到 Google 文档”。

我的第一个答案:Why don't you search properly???

如果你仍然没有找到它。然后,(取自here

您可以使用 Google Documents API 通过简单的 HTTP POST 上传这些数据。以下是如何上传和转换文档的说明:http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingDocs

该链接将为您提供示例以及您需要做的所有事情。

更准确地说,如果您想上传 pdf,这就是您要查找的内容:http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#ResumableUploadPUT

Python Google Documents API guide

PHP Google Documents API guide

【讨论】:

    猜你喜欢
    • 2019-11-07
    • 2013-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-29
    • 2012-04-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多