|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-27 22:23 UTC] zak@php.net
[2000-08-17 12:58 UTC] zak@php.net
[2000-09-06 18:09 UTC] zak@php.net
[2000-09-07 15:03 UTC] zak@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jul 03 01:00:02 2026 UTC |
This works (copied from the manual) : <?php $handle=opendir('.'); echo "Directory handle: $handle\n"; echo "Files:\n"; while ($file = readdir($handle)) { echo "$file\n"; } closedir($handle); ?> This doesn't work : <?php $handle=opendir('.'); echo "Directory handle: $handle\n"; echo "Files:\n"; while ($file = readdir($handle)) { /* just added this test : */ if ($file!=".") { echo "$file\n"; } } closedir($handle); ?> Live example : http://www.onesite.org/testphp/ok.php3 http://www.onesite.org/testphp/ko.php3 http://www.onesite.org/testphp/ok.php3.txt http://www.onesite.org/testphp/ko.php3.txt Live phpinfo: http://www.onesite.org/phpinfo.php3 php.ini : http://www.onesite.org/php.ini PHP installed from the tarball, running as a cgi through a shellscript. Fails from the command line too The same scripts work fine with php 3.0.12