#49928 [NEW]: basicly, im used php 5.2.9
| From: | jmyeom at hotmail dot com | Date: | Mon, 19 Oct 2009 20:55:38 +0000 |
| Subject: | #49928 [NEW]: basicly, im used php 5.2.9 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143706@lists.php.net to get a copy of this message | ||
From: jmyeom at hotmail dot com
Operating system: txt file is a directory
PHP version: 5.3.0
PHP Bug Type: Directory function related
Bug description: basicly, im used php 5.2.9
Description:
------------
im used php 5.2.9
after running some tests, it keeps telling me a txt file IS A DIRECTORy..
then fails to open it
if this is human error, im sorry and could you point me in the right
direction?
Reproduce code:
---------------
function a($hutpear) {
$abc = $hutpear;
if ($handle = opendir($abc)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if (!is_file($file)) {
a($abc . "/" . $file);
} else {
echo "$file\n";
}
}
}
closedir($handle);
}
}
a("photos");
Expected result:
----------------
thisisafile.txt
Actual result:
--------------
br />
<b>Warning</b>: opendir(photos/1/thisisatextdocument.txt) [<a
href='function.opendir'>function.opendir</a>]: failed to open dir: Not a
directory in <b>/home/y02wals/public_html/test.php</b> on line
<b>6</b><br
/>
--
Edit bug report at http://bugs.php.net/?id=49928&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49928&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49928&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49928&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49928&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49928&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49928&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49928&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49928&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49928&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49928&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49928&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49928&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49928&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49928&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49928&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49928&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49928&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49928&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49928&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49928&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49928&r=mysqlcfg