ID:               49928
 Updated by:       j...@php.net
 Reported By:      jmyeom at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Directory function related
 Operating System: txt file is a directory
 PHP Version:      5.3.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




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

[2009-10-19 20:58:32] jmyeom at hotmail dot com

sorry, forgot this, a more detailed report is here:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/Q_24824474.html#a25608711

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

[2009-10-19 20:55:38] jmyeom at hotmail dot com

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 this bug report at http://bugs.php.net/?id=49928&edit=1

Reply via email to