note 14603 rejected and deleted from function.file-exists.php by andy

From: Date: Mon, 06 Aug 2001 13:01:09 +0000
Subject: note 14603 rejected and deleted from function.file-exists.php by andy
Groups: php.notes 
Request: Send a blank email to php-notes+get-16381@lists.php.net to get a copy of this message
Am I an idiot? <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"); ?> <br> 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.notes (#16381) next »