[PHP] [PHP-GENERAL] Serving docs from PHP
Beginner to PHP so I guess this could be a really simple answer. I have a page linking to a ms word doc however the doc doesn't open up in word within the sectioned part of the browser but displays a load of gobble e.g.. ÐÏࡱá þ L N þÿÿÿK ÿÿÿì¥Á 7 ` ` ` ~ « « « I can open a word doc in the browser from a html page just not a PHP file. I 've checked the Apache httpd conf file and the mine types which are fine But I think I missing something in the PHP conf files. Thanks for any help. Alex James -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [PHP-GENERAL] Serving docs from PHP
John Nichel wrote: Your php page has a link to the word document like this a href=word.docMy Document/a? Show some code. Sorry Here is the link in menu6.php h3a href=index.php?m=6PK PATTERNS/a/h3 a href=index.php?m=6c=pkPatterns/MicroModel.docMicro models/a a href=index.php?m=6c=pkPatterns/test.htmlTest/a and getting called in here in index.php ?php $c = $_GET[c]; if ($c != ) { include($c); } else { include(content1.php); } ? Thanks Alex James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [PHP-GENERAL] Serving docs from PHP
John Nichel wrote: On the page that you're trying to serve the Micro$oft Document (index.php), you're going to have to include the content type in the header, something like... header ( Content-type: application/msword ); See here... http://us4.php.net/manual/en/function.header.php Thanks John for your reply. I have tried putting a header before the html tag unfortunately all this does is output index.php in ms word format within the browser. As you've seen with some of the code supplied I want to simulate how a frameset works. So the sidebar (or menu=m) stays the same with the area defined for content changing upon menu options. However how can I open a word doc from a normal HTML file on apache and I can't with a PHP file ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [PHP-GENERAL] Serving docs from PHP
Okay, if you're going to include a MSWord document in a normal HTML file, how do you do thatwhat's your code to do it? Ah...good point. Thought It would work like a frame. But now thinking about it I'm trying to embed a word doc in the html and guess because I not using some object or activeX control it won't work. Right I'm going to save the word docs as txt files and include ? Thanks Alex James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php