Re: file_exists bug?

From: Date: Mon, 06 Aug 2001 08:13:59 +0000
Subject: Re: file_exists bug?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61383@lists.php.net to get a copy of this message
As documented: http://php.net/clearstatcache -Rasmus On Mon, 6 Aug 2001, Ken Williams wrote: > Am I an idiot? > (View this message as text) > > <html> > <body> > <? > $bIsFileOne = is_file("/tmp/test.txt"); # Will be true cause test.txt will > exist > > sleep (5); # Sleep while you telnet in and remove test.txt quickly! > $sTemp = /bin/rm -R /tmp/test.txt; # Or just remove it > automatically > sleep (5); # Sleep just to be safe > > $bIsFileTwo = file_exists("/tmp/test.txt"); > $bIsFileThree = is_file("/tmp/test.txt"); > ?> > > File1:<? echo $bIsFileOne; ?> > File2:<? echo $bIsFileTwo; ?> > File3:<? echo $bIsFileThree; ?> > > File 2 and 3 should show false or 0 cause the file is gone, but they say 1 > just like bIsFileOne! > </body> > </html> > > Linux 2.2.18 > PHP 4.0.6 > > > >

« previous php.general (#61383) next »