note 33866 deleted from function.readfile by nlopess

From: Date: Mon, 06 Sep 2004 12:42:31 +0000
Subject: note 33866 deleted from function.readfile by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76102@lists.php.net to get a copy of this message
Note Submitter: trouby at hotmail dot com ---- if you want to force a download, you could use this: <?php // download.php?name=filename header("Content-type: application/force-download"); header("Content-Disposition: attachment; filename=".$_GET["name"]); @readfile('./'.$_GET['name']); ?> I used this so i force my users to donwload the file the uploaded, but realise that you set your server free to download every file on it to you users. Then can download all file (including database connecting passwd etc).

« previous php.notes (#76102) next »