Re: php download problem.
- From: Andy Hassall <andy@xxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 21:33:26 +0100
On 30 Aug 2005 11:56:11 -0700, "kevinm3574" <kevintm@xxxxxxxxxxxxx> wrote:
> header("Content-length: " . filesize($path) . "\r\n");
> }
> $fp=fopen($path, 'rb');
> fpassthru($fp);
> fclose($fp);
>
>Download dialogue pops just fine and the file gets saved. However,
>without fail, the file is 2 bytes larger than the source file. I'm
>stumped. Any ideas?
Leading or trailing space in the PHP file?
Have you put the resulting file through a hex editor to find what those two
bytes are? (I think it's a good bet they're \r\n)
You also don't need to put \r\n in calls to header() - this may even be
causing problems.
--
Andy Hassall :: andy@xxxxxxxxxxx :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
.
- Follow-Ups:
- Re: php download problem.
- From: kevinm3574
- Re: php download problem.
- References:
- php download problem.
- From: kevinm3574
- php download problem.
- Prev by Date: Re: help w/ php mysql connect problem!!
- Next by Date: Re: php download problem.
- Previous by thread: php download problem.
- Next by thread: Re: php download problem.
- Index(es):
Relevant Pages
|