Re: Download function for php

From: Date: Mon, 09 Jul 2001 14:50:22 +0000
Subject: Re: Download function for php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56935@lists.php.net to get a copy of this message
why do you need a function for this ? why dont you just make a link to the file ? <a href='some_src.tgz'>some_src </a> as long as some_src.tgz is in the web root this will work. and if the file is not in the web root, then why are you downloading something from the web not int the web root ? make a symbolic link from the src file to a link in the web root. of course you could allways send the download headers and readfile() the file. <?php Header("Content-disposition: attachment; filename=\"declined.txt\""); Header("Content-type: application/download"); readfile('/tmp/php/some_src.tgz'); ?> -- Chris Lee lee@mediawaveonline.com "Mark Lo" <mark@3dsources.com> wrote in message news:001101c10884$863351a0$caccfea9@Mark... > Hi, > > Is there any php download function for php. I am asking is the one like > downloading the file from the server when people click the link. Like > downloading php sources tar file. > > Thank you > > Mark >

« previous php.general (#56935) next »