rgunj birgunj wrote:
can any body tell me how to prevent documents from download using
php.
On Aug 31, 2007, at 9:23 AM, Gary Mort wrote:
You don't.
You can put them out of the docroot for your webserver... but then
they won't be accessible at all through your site. You can wrap the
files in a php script that checks for credentials to make sure a user
has access to the file, but, and I have to explain this to clients
all the time, when someone views a file on the web, the file is
*downloaded* to their computer for it to be viewed. There's no way
to get around this. The user might have to figure out how to get it
from their cache, but there's no way to let someone view a file
without it being transfered to their computer and therefore it's not
possible to keep a person from saving the file somewhere if they're
smart enough.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php