|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-01 09:44 UTC] aidan@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 03:00:02 2025 UTC |
Description: ------------ Opendir does not appear to like having a number as the first char of a directory name. If I rename 100LEVEL to LEVEL100 then the code works. Reproduce code: --------------- $current_dir "D:\htdocs\assessment\form40s\approved\100LEVEL"; $dir = opendir($current_dir); while (false !== ($file=readdir($dir))) { print $file; } closedir($dir); Expected result: ---------------- CIS100.pdfCIS103 (TECH 03-26) pdf.pdfCIS103.pdfCIS111(TECH 03-33) .pdfCIS111.pdfCIS140.pdfCIS166 FALL-2004.pdfCIS166(TECH 04-04).pdfCIS166- 2000.pdfCIS180(TECH 03-34).pdfCIS180.pdfCIS187.pdfFall 2003 Tech School Network.mdbFall 2003 Tech School.lnk This is the results when the directory is named LEVEL100. I will format the text later. Actual result: -------------- PHP Warning: opendir(D:\htdocs\assessment\form40s\approved@LEVEL): failed to open dir: Invalid argument in D:\htdocs\assessment\form40s\approved\index.php on line 14 PHP Warning: readdir(): supplied argument is not a valid Directory resource in D:\htdocs\assessment\form40s\approved\index.php on line 15 PHP Warning: closedir(): supplied argument is not a valid Directory resource in D:\htdocs\assessment\form40s\approved\index.php on line 20