将Powerpoint查看器嵌入网页(PHP)

将Powerpoint查看器嵌入网页(PHP)

问题描述:

我正在构建一个PHP应用程序,用户可以在其中上传Powerpoint文件。我希望其他用户可以在线查看而不是下载。 (对于用户而言,使用google docs这样的第三方应用可能会比较麻烦)。是否可以用PHP编写PowerPoint查看器代码?

I am building a PHP application where the user upload Powerpoint files. I want the other users to view it online instead of downloading. (Using a third party apps like google docs might be a little cumbersome for the users) Is it possible to write a powerpoint viewer code in PHP?

您可以自动化将php与Google docs结合使用的过程。

You could automate the process of using google docs with php.

Google提供了一个ppt查看器,可以使用以下代码将其嵌入到网页中

Google provides a ppt viewer that can be embed into webpages using the following code

<iframe src="http://docs.google.com/gview?url=http://www.domainname.come/presentation.ppt&embedded=true" style="width:550px; height:450px;" frameborder="0"></iframe>

现在我假设php处理了用户上传的内容,因此很容易找到该网址特定的ppt文件。您可以将该URL存储在变量或数据库中,在需要时提取它,并将其放在上面的代码中。

Now im assuming php handles the uploads your users make, thus it would be easy to find the url to the specific ppt file. You could store this url either in a variable or a database, fetch it when needed and place it in the code above.

我希望我已经能够解释尝试应用的逻辑,请告诉我是否需要更多规范。

I hope I have been able to explain the logic im trying to apply, do let me know if you need more specifications.