#24086 [Opn->Fbk]: file_exists generates false error
| From: | sniper@php.net | Date: | Mon, 09 Jun 2003 13:38:01 +0000 |
| Subject: | #24086 [Opn->Fbk]: file_exists generates false error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-41518@lists.php.net to get a copy of this message | ||
ID: 24086
Updated by: sniper@php.net
Reported By: danfratus at attbi dot com
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows XP Professional
PHP Version: 4.3.2
New Comment:
Exactly what is the bug here? file_exists("...") ??
or what? (that returns FALSE..)
Previous Comments:
------------------------------------------------------------------------
[2003-06-08 17:41:14] danfratus at attbi dot com
<?
if (file_exists("$file") && $file != "." && $file !=
"..")
{
$file = join('',file($file));
echo "$file";
}
?>
Ok the glitch is this: if $file is "." or ".." the script is fine, no
errors are generated, but, when $file is "..." or "......." or
"..................", etc. then for some reason PHP reconizes this as a
directory, yet it can't be included therefore generating this error:
---
Warning: file(...) [function.file]: failed to create stream: No such
file or directory in F:\server\bug.php on line 4
Warning: join() [function.join]: Bad arguments. in F:\server\bug.php on
line 4
---
This "bug" isn't going to crash the entire internet or anything, but it
should be fixed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24086&edit=1