readfile() problem
- From: lists@xxxxxxxxxxx ("Peter Lauri")
- Date: Thu, 12 Oct 2006 23:43:51 +0700
Hi gang,
I have a problem. I am using readfile() to send files to the browser. The
code is below. I had is working on another server before, but now my client
have moved to a new server and we have started to experience problems with
bigger files.
I have three different files that I am sending. They are 3MB, 15MB and 59MB
large. The 3MB and 15MB are working fine, but the 59MB does not work. I have
checked so that the file_exist() and also was able to retrieve filesize() of
the file, so the file is there. I have also tried to download it with the
url I know it is located at, and that works too.
Is there any limitations or settings of how large the files can be when
using readfile()? If so, are they settable?
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$Row[filename]");
header("Content-Transfer-Encoding: binary");
$filesize = filesize($filelocation);
header("Content-Length: $filesize");
readfile($filelocation);
Best regards,
Peter Lauri
www.lauri.se - personal website
www.dwsasia.com - company website
.
- Follow-Ups:
- Re: [PHP] readfile() problem
- From: "Richard Lynch"
- Re: [PHP] readfile() problem
- Prev by Date: RE: [PHP] Re: Understanding persistent connections with oci8
- Next by Date: RE: [PHP] PHP Mailer and SMTP = SPAM?
- Previous by thread: RE: [PHP] PHP Mailer and SMTP = SPAM?
- Next by thread: Re: [PHP] readfile() problem
- Index(es):
Relevant Pages
|