0

I currently have a problem to open a .ppt/.pptx file inside a webpage. I currently have all "uploaded" file in a folder and am able to open .html/.txt files in that folder, but not .ppt/.pptx. Whenever I try, a new window pops up and Windows Uploader starts to run.

<?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>

In the above code, I try to list all files in the folder, and the goal is a user can click on one of the file, then the file will open inside the webpage. The main problem I have right now is to have the program each individually attach different .ppt url to different files.

Thank you in advance!

Angela Nie
  • 87
  • 2
  • 7
  • Did you check this: http://stackoverflow.com/questions/7101080/embed-a-powerpoint-in-a-web-page – Nepal12 Mar 25 '15 at 15:33
  • @Nepal12 Thank you for your response. Sorry I am really a newbie to this. So now I have a local folder holding all the .ppt files I want to embed, and will be more coming as user uploads more to that folder. How do I using HTML/PHP to upload those to Google Doc and then embed the different Google Doc url to each file? – Angela Nie Mar 25 '15 at 16:53

1 Answers1

0

For your question "How to upload to Google Docs".

My first Answer:Why don't you search properly???

If you still don't find it. Then, (taken from here)

You'd use the Google Documents API to upload them using a simple HTTP POST with the data. Here's an explanation how to upload and convert documents: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingDocs

The link will provide you will examples and all you need to do what you were asking for.

To be more precise this is what you are looking for if you want to upload pdf's: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#ResumableUploadPUT

Python Google Documents API guide

PHP Google Documents API guide

Community
  • 1
  • 1
Nepal12
  • 583
  • 1
  • 12
  • 29