Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 06-14-2008, 02:31 PM   #1
In Runtime
 
Join Date: Dec 2007
Posts: 195
Default PHP Content:type:

Hey guys,

I am writing a php webpage that will create a batch file for the user to download and run automatically.

I already have the page done to write to the batch file, and that is running great. I however, am running into a little bit of a problem with prompting the user to download the batch file.

Here is what I have so far for the page that makes them download the file.
Code:
<?php
header('Content-disposition: attachment; filename=rungame.bat');
header('Content-type: application/pdf');
readfile('rungame.bat');
?>
This will have the user prompted to download the file, but does not give them the option to "OPEN" the file. Are there any Content-types that I can use that will give them the ability to choose to "OPEN" the file, and not just "SAVE" the file?

Or does anyone know of a list of acceptable Content-types?

Thanks.
colorblindjimbo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:23 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0