Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 06-14-2008, 01: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.
header('Content-disposition: attachment; filename=rungame.bat');
header('Content-type: application/pdf');
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?

colorblindjimbo is offline   Reply With Quote

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 06:39 AM.

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