PHP file download

Alles, was PHP betrifft, kann hier besprochen werden.

PHP file download

Postby aj123cd » 02. September 2009 19:51

PHP file download
<?php
header('Content-disposition: attachment; filename=movie.mpg');
header('Content-type: video/mpeg');
readfile('movie.mpg');
?>
Work fine. But only small amount of date can able to download.
Why? Can anyone tell me how I can make it work.
Thank you all.
aj123cd
 
Posts: 62
Joined: 03. June 2009 08:19
Location: London,UK

Re: PHP file download

Postby Stepke-DSL » 08. September 2009 08:05

Hi,

What filesize did the files have?

MfG Stepke
Stepke-DSL
 
Posts: 313
Joined: 12. July 2007 16:08
Operating System: Win XP Pro SP3 + SuSe Linux

Re: PHP file download

Postby aj123cd » 08. September 2009 17:27

4.5gb
thanks
aj123cd
 
Posts: 62
Joined: 03. June 2009 08:19
Location: London,UK

Re: PHP file download

Postby Wiedmann » 08. September 2009 17:48

4.5gb

There is a 2GB limit in PHP for filesystem functions...
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: PHP file download

Postby aj123cd » 08. September 2009 17:54

when i try to move 800kb, only down load 281kb
thanks
aj123cd
 
Posts: 62
Joined: 03. June 2009 08:19
Location: London,UK

Re: PHP file download

Postby Wiedmann » 08. September 2009 18:27

when i try to move 800kb, only down load 281kb

Maybe you want tell us more about your system...

I have no problems to download the file "xampp-win32-1.7.2.exe" ~45MB in my browser while using readfile() in the download script.


BTW:
You have also problems to see "large" pictures in your browser?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: PHP file download

Postby aj123cd » 08. September 2009 18:36

Vista Ultimate, RAM 2GB. HD 360, Sys Type 32Bit OS.
Yes I Can sees large files and downloads bigger files, only when I us this PHP code I cannot complete the download.

thanku
aj123cd
 
Posts: 62
Joined: 03. June 2009 08:19
Location: London,UK

Re: PHP file download

Postby Stepke-DSL » 09. September 2009 08:17

Have a look at the downloaded file with notepad.
Maybe you have a error in your script and thatswhy the files are so small.

I have no problems with XAMPP and downloadscripts with normal-sized files (up to ca. 10 MB/file)...

Stepke
Stepke-DSL
 
Posts: 313
Joined: 12. July 2007 16:08
Operating System: Win XP Pro SP3 + SuSe Linux


Return to PHP

Who is online

Users browsing this forum: No registered users and 50 guests