ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hey I am trying to link to an odt (Open Document Text) file Internet Explorer always seem to want to open them in a zip program. I understand that a odt (and docx I have this problem with also) are infact ZIP files - but I want to be able to link to them in the same way I can a PDF or DOC for users to choose what doument format they want do download (PDF,DOC,DOCX,ODT).
If anyone knows of any kind of extra I can put in the tag, or some php or something I can use to make these download like normal files, and not ZIP files.
I think it is rather amusing that Firefox (and Opera) understands a DOCX is a Word file and asks to open it in Word, and yet IE programed by the same company wants to open it in WinZip!
Well, IE isn't something behind the word "best out there".
Good though that you care about it, I know many web site creators who would just have let the problem be as it is, "it's their fault if they use such a bad browser".
I thought there was a way to "force" downloading a file rather than opening it directly but as you are wrestling with that problem, I guess not..sorry for not being able to help atm.
The server may be sending a MIME type that makes IE think it is a ZIP file. Try having PHP send the MIME type of application/vnd.oasis.opendocument.text or application/msword
As a hack to get around the problem, I have seen sites that say "right click and save as"... but that is not the ideal solution.
Add an association for that mimetype. Even better would be to not use Internet Explorer. It's even the recommendation of the dept of Homeland Security.
I don't use windows.... I use Firefox for most of my stuff, IE or Opera for other things... but there are of course 70% or more people that use Windows and IE so I have to look after them especially concidering I am trying to get as many people as possible to read and print and sign this document. I don't look after the server or the PHP installation as I am hosting files on a Uni web server for someone else - but I will speak to the tech guys at the Uni to get it sorted out.
This is what I thought (that PHP reads the file and see's it is a ZIP file and sends that MIME - or something to that effect).
In PHP, you can change the headers in order to tell the browser the file type:
PHP Code:
header("Content-type: text/html");
However, doing this requires that you read the file in PHP, and echo it out to the browser, also setting the other headers such as Content-size.
Doing this does increase the server load slightly.
It is better if the Apache configuration is updated (actually the MIME magic file on the system) to a version that can identify open document files without all this code.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.