代码之家  ›  专栏  ›  技术社区  ›  Angela Nie

在网页中嵌入ppt文件

  •  0
  • Angela Nie  · 技术社区  · 10 年前

    我当前在网页中打开.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附加到不同的文件。

    提前谢谢!

    1 回复  |  直到 10 年前
        1
  •  0
  •   Community CDub    7 年前

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

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

    如果你仍然找不到它 here )

    您可以使用GoogleDocumentsAPI,使用简单的HTTPPOST和数据上传它们。以下是如何上载和转换文档的说明: 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