Re: [PHP] File download problem

2008-08-19 Thread tedd
At 3:32 PM +0100 8/19/08, Ashley Sheridan wrote: That bug report makes sense now, in light of your problem. It wasn't something I'd ever seen happen before, as most of my work is done on Linux, and the bug seems to be specific to the way Windows uses the BOM for UTF-8 PHP files. Ash: A probl

Re: [PHP] File download problem

2008-08-19 Thread Ashley Sheridan
That bug report makes sense now, in light of your problem. It wasn't something I'd ever seen happen before, as most of my work is done on Linux, and the bug seems to be specific to the way Windows uses the BOM for UTF-8 PHP files. Ash www.ashleysheridan.co.uk --- Begin Message --- I just add this

Re: [PHP] File download problem

2008-08-19 Thread Stefano Noffke
I just add this comment for reference. I found this bug report on the PHP Web site: http://bugs.php.net/bug.php?id=22108 That bug explains everything :) Stefano Stefano Noffke wrote: Thanks for the reply. I think I found the problem here: The php file was saved with UTF-8 encoding, and for

Re: [PHP] File download problem

2008-08-19 Thread Stefano Noffke
ysheridan.co.uk Subject: Re: [PHP] File download problem From: Stefano Noffke <[EMAIL PROTECTED]> Date: Tue, 19 Aug 2008 15:17:25 +0200 To: php-general@lists.php.net To: php-general@lists.php.net I checked the files with an HEX editor, and I found that each downloaded file starts with "EFBB

Re: [PHP] File download problem

2008-08-19 Thread Ashley Sheridan
p); } fclose($fp); exit(); The "rb" in the fopen function instructs PHP to open the file for reading in a binary safe manner. Hope this helps. Ash www.ashleysheridan.co.uk ------------ Oggetto: [PHP] File download problem Da

Re: [PHP] File download problem

2008-08-19 Thread Stefano Noffke
---------- Oggetto: [PHP] File download problem Da: Stefano Noffke <[EMAIL PROTECTED]> Data: Mon, 18 Aug 2008 16:01:22 +0200 A: php-general@lists.php.net A: php-general@lists.php.net Greetings, I need to create a script to let registered users to download files from a non-p

Re: [PHP] File download problem

2008-08-18 Thread Stefano Noffke
exit(); The "rb" in the fopen function instructs PHP to open the file for reading in a binary safe manner. Hope this helps. Ash www.ashleysheridan.co.uk ------------ Oggetto: [PHP] File download problem Da: Stefano Noffke

Re: [PHP] File download problem

2008-08-18 Thread Ashley Sheridan
Hi Stefano, You can use this code instead to read in the file and output it to the browser, as it is binary safe. I've used it for the same reason you require, and it works fine with video clips. $fp = fopen($path, "rb"); while(!feof($fp)) { print(fread($fp, 1024)); flush($fp); } fc

[PHP] File download problem

2008-08-18 Thread Stefano Noffke
Greetings, I need to create a script to let registered users to download files from a non-public folder. The files name, type, and size are stored in a MySQL Database. The user need to click on a link, and a PHP script should handle the download of the file. Here is how I organized it: Th

[PHP] File download problem using Netscape 7.x

2003-10-02 Thread Ulrich Hacke
Hello, I have some files on a website which the user can download (e.g. pdf, zip...). The files sould not bw displayes but the browser should aks the user what to do (e.g. save it to disk, open it). My code look like this: header("Content-type: application/octet-stream"); header("Content-dispositi