Ninjakreborn Posted February 14, 2007 Share Posted February 14, 2007 There is a way to take a text file and display it on a screen rather easily. Is there anyway at all, to take a word document, and open it in the browser like you can do with a text file. Like click on the file and it shows on the screen. Same with php pages, and/or xhtml pages. Is there a way to have them just output on the screen (mostly word documents). Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/38531-solved-word-document-decoding-with-php/ Share on other sites More sharing options...
redarrow Posted February 14, 2007 Share Posted February 14, 2007 pdf i no of but nothink else my option. Quote Link to comment https://forums.phpfreaks.com/topic/38531-solved-word-document-decoding-with-php/#findComment-184922 Share on other sites More sharing options...
effigy Posted February 14, 2007 Share Posted February 14, 2007 You can open just about anything if you have the right headers. Notice the use of "application/msword" in this post. Quote Link to comment https://forums.phpfreaks.com/topic/38531-solved-word-document-decoding-with-php/#findComment-184926 Share on other sites More sharing options...
Ninjakreborn Posted February 14, 2007 Author Share Posted February 14, 2007 I didn't undertand what you meant, let me rephrase the question. I know for a fact that .txt, .php, .htm, .html, .js, and .css files can be setup to where when someone clicks the filename, it comes up and displays all the text inside the file on the screen. Like it was general text on a page. I know this is possible nad have even done it. However I was wondering about .doc files. Can someone do the same thing with a .doc file, because using fread and just echoing the information (which works with the other filetypes) doesn't work with word document files. Is there another method (even a long workaround) that does allow you to do this. Quote Link to comment https://forums.phpfreaks.com/topic/38531-solved-word-document-decoding-with-php/#findComment-184927 Share on other sites More sharing options...
Ninjakreborn Posted February 14, 2007 Author Share Posted February 14, 2007 Ah ok, so you just open the file, then you dynamically insert the header to have it display to the page. That makes sense, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/38531-solved-word-document-decoding-with-php/#findComment-184929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.