Click here to Skip to main content
15,922,309 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 1:56
hiral_shah6-Mar-07 1:56 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 13:29
Bradml6-Mar-07 13:29 
Then you are going to need the "Content-type: [content type]" header. You can get the value when it is first uploaded:

$fileType = $_FILES['NAME']['type'];

//This is an example of using this value.

str_replace("\n", "", $fileType); //Security
str_replace("\r", "", $fileType); //Security

header("Content-type: {$fileType}"); //Send Header

echo $File; //Echo the file down. 







Brad
Australian

- Captain See Sharp on "Religion"

any half intelligent person can come to the conclusion that pink unicorns do not exist.

GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 17:47
hiral_shah6-Mar-07 17:47 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 17:59
Bradml6-Mar-07 17:59 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:09
hiral_shah6-Mar-07 18:09 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 18:13
Bradml6-Mar-07 18:13 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:18
hiral_shah6-Mar-07 18:18 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:31
hiral_shah6-Mar-07 18:31 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 18:34
Bradml6-Mar-07 18:34 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:42
hiral_shah6-Mar-07 18:42 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 19:00
Bradml6-Mar-07 19:00 
GeneralRe: Open a file from server [modified] Pin
hiral_shah6-Mar-07 19:23
hiral_shah6-Mar-07 19:23 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 19:50
Bradml6-Mar-07 19:50 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 19:58
hiral_shah6-Mar-07 19:58 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 20:14
Bradml6-Mar-07 20:14 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 20:46
Bradml6-Mar-07 20:46 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 20:46
Bradml6-Mar-07 20:46 
GeneralRe: Open a file from server [modified] Pin
hiral_shah6-Mar-07 21:27
hiral_shah6-Mar-07 21:27 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 21:56
Bradml6-Mar-07 21:56 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 23:14
hiral_shah6-Mar-07 23:14 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 23:25
Bradml6-Mar-07 23:25 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 23:26
Bradml6-Mar-07 23:26 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 23:26
Bradml6-Mar-07 23:26 
GeneralRe: Open a file from server Pin
hiral_shah7-Mar-07 0:01
hiral_shah7-Mar-07 0:01 
GeneralRe: Open a file from server Pin
hiral_shah7-Mar-07 0:03
hiral_shah7-Mar-07 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.