File Download within Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
jensr
New Member
New Member
Posts: 8
Joined: Tue Feb 26, 2008 1:59 pm

File Download within Module

Post by jensr »

Hey,

its me again, I have a function within my module, which counts and downloads files:

Code: Select all

..

//prepare header
header("Content-type: ".filetype(PATH.$filename));
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Length: ".filesize(PATH.$filename));

readfile(PATH.$filename);
	
exit;

..
This code works fine as standalone, but not within my module.
I have CMS HTML-Code within my downloads.

Can somebody help me?

Kind regards,
Jens
alby

Re: File Download within Module

Post by alby »

jensr wrote: its me again, I have a function within my module, which counts and downloads files:
Why you don't use Uploads module?

Alby
jensr
New Member
New Member
Posts: 8
Joined: Tue Feb 26, 2008 1:59 pm

Re: File Download within Module

Post by jensr »

Because I try to include a script and don't want to use another module for this function..
Post Reply

Return to “Modules/Add-Ons”