[PHP-WIN] RE: [PHP] Problem using readfile

2001-03-09 Thread Fernando Madruga
What are the contents of $type? When opening the file directly, the browser will probably use the specified $type information, as opposed to the explorer using the file extension when the user saves it to disk, so the problem may be that $type is not correct... ;) HTH, Fernando Madruga -Or

[PHP-WIN] Re: [PHP] Problem using readfile

2001-03-07 Thread Matias Pelenur
Well, I tried using different code (from a newer message by Mukul Sabharwal): header("Content-length: $size"); header("Content-type: $type"); $fp = fopen($actualfile, 'rb') or print('Could not open file!'); $read = fread($fp, $size) or print('Could not read file'); print($read); and this seems