Re: Displaying a file

From: Date: Mon, 10 Mar 2003 03:06:40 +0000
Subject: Re: Displaying a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138904@lists.php.net to get a copy of this message
Change your link to something like: <a href="view.php?file=raceschedule.pdf" ...>...</a> view.php will NOT be a "HTML page" -- it will be responsible for: a) some conditional stuff, like checking for a logged in user b) output an appropriate header for the file type c) pass through the actual file contents You would actually want to store the target files outside the doc root, or forbid apache to serve them directly over http. There's a decent article here: http://www.zend.com/zend/trick/tricks-august-2001.php Justin French on 10/03/03 1:17 PM, Todd Cary (todd@aristesoftware.com) wrote: > I want to display a file under program control in the same manner as one > would with using an >a> tag e.g. > > Click <a href="files/raceschedule.pdf" Name="Race Schedule" > Target="_blank">here</a> to open the Race Schedule > > In other words, if certain conditions are met, then I want to display > the file. What is the best way to do that? > > Many thanks..... > > Todd

« previous php.general (#138904) next »