note 73728 added to function.readdir
| From: | singh206 at gmail dot com | Date: | Thu, 08 Mar 2007 00:43:34 +0000 |
| Subject: | note 73728 added to function.readdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124217@lists.php.net to get a copy of this message | ||
When I place my .php file in a folder on the root directory this works, but if I place it in the
root directory it starts randomly adding '._' to the files in the array.
Does anyone have any idea whatsoever why this might occur?
function makeArray($Directory){
$myArray = array();
if ($handle=opendir($Directory)){
while (false!==($myFile = readdir($handle))){
if ($myFile!="." && $myFile!=".." && $myFile
=".DS_Store"){
array_push($myArray,basename("$myFile"));
}
}
closedir($handle);
}
return $myArray;
}
----
Server IP: 216.194.113.175
Probable Submitter: 24.16.4.31
----
Manual Page -- http://www.php.net/manual/en/function.readdir.php
Edit -- https://master.php.net/note/edit/73728
Del: integrated -- https://master.php.net/note/delete/73728/integrated
Del: useless -- https://master.php.net/note/delete/73728/useless
Del: bad code -- https://master.php.net/note/delete/73728/bad+code
Del: spam -- https://master.php.net/note/delete/73728/spam
Del: non-english -- https://master.php.net/note/delete/73728/non-english
Del: in docs -- https://master.php.net/note/delete/73728/in+docs
Del: other reasons-- https://master.php.net/note/delete/73728
Reject -- https://master.php.net/note/reject/73728
Search -- https://master.php.net/manage/user-notes.php