#41735 [Opn]: file_exists reports incorrect results
| From: | php-bug at okra dot org | Date: | Tue, 19 Jun 2007 01:47:32 +0000 |
| Subject: | #41735 [Opn]: file_exists reports incorrect results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-113914@lists.php.net to get a copy of this message | ||
ID: 41735
User updated by: php-bug at okra dot org
Reported By: php-bug at okra dot org
Status: Open
Bug Type: Filesystem function related
Operating System: Windows Server 2003
PHP Version: 5.2.3
New Comment:
Correction: The "Expected result" below is from PHP 5.2.1.
Previous Comments:
------------------------------------------------------------------------
[2007-06-19 01:45:53] php-bug at okra dot org
Description:
------------
file_exists() returns strange results in PHP 5.2.3. This worked fine in
5.2.1. The "Actual result" below is from PHP 5.2.1 on the same server.
Reproduce code:
---------------
<?php
header('Content-type: text/plain');
foreach (array('d:/home', 'd:/home/domain.com',
'd:/home/domain.com/phpinfo.php', 'c:/WINDOWS', 'c:/WINDOWS/system32',
'c:/bogus') as $file) {
echo "$file: " . (file_exists($file) ? 'yes' : 'no' ) .
"\n";
}
?>
Expected result:
----------------
d:/home: yes
d:/home/domain.com: yes
d:/home/domain.com/phpinfo.php: yes
c:/WINDOWS: yes
c:/WINDOWS/system32: yes
c:/bogus: no
Actual result:
--------------
d:/home: yes
d:/home/domain.com: no
d:/home/domain.com/phpinfo.php: yes
c:/WINDOWS: no
c:/WINDOWS/system32: yes
c:/bogus: no
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41735&edit=1