I am writing a page that allows users to upload images and documents onto my site and then the site will display them. I was wondering how to get a doc to display on the page.
I'm not sure is this is the answer to your question or not, but I think you want to open a text document, read the content and then display it on the screen. You may want to read on PHP functions like: fopen() fread() fgets()
If you just want to display text files, look at the fpassthru function, but if it's something exotic like microsift word you will have to do some fancy stuff e.g.
convert the .doc file into HTML with a 3rd party tool
allow word to fire up on the client PC to view it
Look at the ms office section on the microsoft web site which have ofice file viewers to download (which allow you to view word and excell file without having the full product) which you could include a link to for users to access if the need to.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.