Using this code, I can able to download upto 4MB size files only. If my download exceed 4MB files, it downloads that file and if i tried to open the file it shows some error and it could not be opened.
For example:
1) If I download pdf files, then it shows while opening it,
"There was an error opening this document. The file is damaged and could not be repaired"
2) If I download zipped file, then it shows
"No archives to extract".
Thank you mm. Yes my download file size is very small than the whole file. Ya i doesn't download fully. But I don't know what is professional readfile(). Can you please give any reference link for that?
What are you trying to do?
What are you trying to do? Core comes with the upload module and if using CCK there is the filefield module.
File Download
Thank you for your reply nevets.
I uploaded my files into server through FTP. I used this php code to download that file.
<?php$file="pactus.zip";
header("Content-type: application/octet-stream");
header("Content-Type: application/zip");
header("Content-Type: application/jpg");
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=\"$file\"");
header("Content-Transfer-Encoding: binary");
readfile("pactus.zip");
?>
Using this code, I can able to download upto 4MB size files only. If my download exceed 4MB files, it downloads that file and if i tried to open the file it shows some error and it could not be opened.
For example:
1) If I download pdf files, then it shows while opening it,
"There was an error opening this document. The file is damaged and could not be repaired"
2) If I download zipped file, then it shows
"No archives to extract".
How can I solve this problem?
Thanks,
Revathy.
check the file size after
check the file size after download. I guess u haven't successfully downloaded the whole file due to memory issue.
u may need a professional readfile() function (then the FREE readfile()) to handle large files.
good day.
We go the drupal way. How about you?
http://www.drupalway.com
Thank you mm. Yes my download
Thank you mm. Yes my download file size is very small than the whole file. Ya i doesn't download fully. But I don't know what is professional readfile(). Can you please give any reference link for that?
Thanks,
Revathy.