never_rain Posted December 4, 2008 Share Posted December 4, 2008 Hi, I have uploaded MS Word Files in my website. Now I want that if the visitors of my site click on any Word File Name in my site, instead of downloading, it should open it up in Web Browser such as IE and Mozila. Something like PDF files. I hope you guys can give me an idea as how to achive this using PHP. Thanks Faisal Link to comment https://forums.phpfreaks.com/topic/135485-open-ms-word-file-in-web-browser/ Share on other sites More sharing options...
spewperb Posted December 4, 2008 Share Posted December 4, 2008 I'm pretty sure this won't work. The problem is because they are word files, you're reliant on the end user having word installed and as far as I'm aware there isn't a browser plugin for it either. The only way this could be possible is by writing a script that parses a word file and converts it into html. I know you can parse excel... Try looking at pear on the off chance they do have a library that supports word. Alternatively upload your documents as pdfs. They are much more accessible than word. Converting a word document to a pdf is a breeze to. Link to comment https://forums.phpfreaks.com/topic/135485-open-ms-word-file-in-web-browser/#findComment-705826 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.