note 14814 deleted from control-structures.switch by david

From: Date: Thu, 30 May 2002 15:51:23 +0000
Subject: note 14814 deleted from control-structures.switch by david
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-31213@lists.php.net to get a copy of this message
In response to White's download script: This becomes very inefficient when dealing with hundreds or even thousands of files. If you must use this sort of scenario, simply use: <?php if ($file) { $download = $file.".zip"; include("$download"); } else { include("downloads.php"); } ?> where the header is file.php?file=file1 additionally, you may want to add a directory onto $download, etc. I don't know why someone would put file downloads in the same directory as the pages.

« previous php.notes (#31213) next »