This was my first approach to protect some media files for a project,
it worked well, but resource consumption was extremely high, and i
ended up with a different solution that works 10 times faster using
far less resources, it's based on the secure download module available
in lighttpd.

http://dtemes.blogspot.com/2011/05/secure-downloads-with-apache-and.html



On 22 sep, 17:18, Ryan Schmidt <[email protected]> wrote:
> On Sep 22, 2011, at 05:18, heohni wrote:
>
> > if(is_file('../CMS_images/'.....
> > this way I can check if a file is "there".
>
> > But how can I display this image in a view?
>
> Write a controller method that reads and outputs the image using readfile.
>
> http://php.net/readfile
>
> Then, wherever you want to include the image in your view, write an image tag 
> whose src attribute is the URL of that controller method.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to