Bug #61586 [Com]: is_file("path/.ext");
| From: | reeze dot xia at gmail dot com | Date: | Sun, 01 Apr 2012 08:00:29 +0000 |
| Subject: | Bug #61586 [Com]: is_file("path/.ext"); | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-169111@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61586&edit=1
ID: 61586
Comment by: reeze dot xia at gmail dot com
Reported by: simon at cicoss dot net
Summary: is_file("path/.ext");
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: Suse Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Hi simon:
I don't get it. does it look like this?
./testscript.php
./path
/a.json <---- a.json or any *.json ?
file
cat testscript.php
<?php
$filename = "path/.json";
var_dump(is_file($filename)); ===> bool(true)
Previous Comments:
------------------------------------------------------------------------
[2012-03-31 19:57:59] simon at cicoss dot net
Description:
------------
---
From manual page: http://www.php.net/function.is-file
---
Due to a small error I found that is_file returns true for something like "path/.ext" when
"path/" files there ".ext".
Test script:
---------------
<?php
$filename = "path/.json";
is_file($filename);true if there are files in path "*. json"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61586&edit=1