header

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
antas
Forum Newbie
Posts: 6
Joined: Mon Apr 14, 2003 7:41 pm

header

Post by antas »

How can I use header to open a msword doc in the browser without having that file tranfer window appearing asking if I want to download the file or open it? I've tried something like this:
<?php
header("Cache-control: private");
header("Content-type: application/x-msword");
header("Content-Disposition: filename=".$_GET['file']);
?>
But still that damn window insists in appearing.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

users may choose to have documents with certain mime-type opened automatically but you can't force it server-side.
Post Reply