Re: Displaying a file
| From: | Justin French | Date: | Mon, 10 Mar 2003 03:16:37 +0000 |
| Subject: | Re: Displaying a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138906@lists.php.net to get a copy of this message | ||
Same way
<img src='image.php?file=myimage.gif' />
image.php would do simular things to what view.php does in the script below.
Justin
on 10/03/03 2:07 PM, Mark Tehara (mark@crushme.dyndns.org) wrote:
> On that note, how would i load an image from outside the document root?
>
>
>
> ----- Original Message -----
> From: "Justin French" <justin@indent.com.au>
> To: "Todd Cary" <todd@aristesoftware.com>; <php-general@lists.php.net>
> Sent: Monday, March 10, 2003 4:06 PM
> Subject: Re: [PHP] Displaying a file
>
>
>> 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
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>