ID:               34589
 User updated by:  pjf at asn dot pl
 Reported By:      pjf at asn dot pl
 Status:           Open
 Bug Type:         *Directory/Filesystem functions
 Operating System: GNU
 PHP Version:      5.0.5
 New Comment:

I made mistake in the code - here is the corrected  
version:  
  
touch("foobar"); 
echo file_exists("foobar") . "\n"; 
 
mkdir("foodir"); 
chdir("foodir"); 
echo file_exists("foobar") . "\n";


Previous Comments:
------------------------------------------------------------------------

[2005-09-21 21:51:41] pjf at asn dot pl

Description:
------------
I find caching of file_exists() and similar functions 
causing strange results - as presented by attached code, 
it might cause unexistent files to... "exist" :). 
 

Reproduce code:
---------------
[EMAIL PROTECTED] file_exists]$ ls
file_exists.php
[EMAIL PROTECTED] file_exists]$ cat file_exists.php
<?php

touch("foobar");
echo file_exists("foobar") . "\n";

mkdir("foodir");
echo file_exists("foobar") . "\n";

?>


Expected result:
----------------
[EMAIL PROTECTED] file_exists]$ php file_exists.php 
1 
 
 

Actual result:
--------------
[EMAIL PROTECTED] file_exists]$ php file_exists.php 
1  
1  
  


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34589&edit=1

Reply via email to