chmod->serve file->chmod back?

From: Date: Sat, 24 Jun 2000 20:09:13 +0000
Subject: chmod->serve file->chmod back?
Groups: php.general 
Request: Send a blank email to php-general+get-2928@lists.php.net to get a copy of this message
Hi, I am trying to change permissions on a file, web serve the content and then change the permissions back so that users cannot see the content unless its via the script (no, people, i'm not running a porn site). Something like this: <?PHP chmod("test.jpg",0644); print "<img src='test.jpg'>; flush(); chmod("test.jpg",0600); ?> This only works sometimes. If I put a "sleep();" after the print, it works more often the higher the argument is for sleep. I assume this means that if the websever doesn't touch the file before the permissions are changed back, tough luck. Any ideas to make this work? Or is there a more obvious solution for this that I am too dense to see? Much thanks, Brady

« previous php.general (#2928) next »