From: Matthias K. <squ...@cr...> - 2002-10-02 21:39:24
|
Hi there, in the plugin "File Manager" I missed the option to download a file so I wrote a little patch to do this.. maybe anyone is interested to.. -- in line 623 of file_manager.php I added a table cell with: echo "<a href='download.php?file=$fullPath&filename=$filename'>download</a>"; -- then I wrote a file named download.php with the following content: <?php header("Content-type: application/octet-stream"); header("Content-Disposition: filename=$filename"); header("Content-Length: ". filesize("$file")); header("Pragma: no-cache"); header("Expires: 0"); $fp=fopen("$file","r"); print fread($fp,filesize("$file")); fclose($fp); ?> Now downloading a file is no problem anymore.. greets, Matthias -- Crossfish Communication Matthias Klappenbach |