readdir problem with white spaces

From: Date: Thu, 15 Jun 2006 12:17:13 +0000
Subject: readdir problem with white spaces
Groups: php.general 
Request: Send a blank email to php-general+get-238076@lists.php.net to get a copy of this message
Hello, I the following problem with readdir When I read the directory, if the file has more than one "white spaces", readdir only return me the file with one space ... so if I have on the file system . "ROAD 1 005.JPG" or "ROAD 1 0005.JPG" php readdir return me ROAD 1 005.JPG!!!!!! while ($file = readdir ($dirlist)) { if ($file != '.' && $file != '..') { echo "FILE: $file<br><br>"; -----> ROAD 1 005.JPG } -rw-rw-r-- 1 seaquist edi 125352 jun 15 12:06 ROAD 1 001.JPG -rw-rw-r-- 1 seaquist edi 157365 jun 15 12:06 ROAD 1 002.JPG -rw-rw-r-- 1 seaquist edi 115891 jun 15 12:07 ROAD 1 004.JPG -rw-rw-r-- 1 seaquist edi 135876 jun 15 12:07 ROAD 1 005.JPG -rw-rw-r-- 1 seaquist edi 103983 jun 15 12:07 ROAD 2 003.JPG -rw-rw-r-- 1 seaquist edi 92410 jun 15 12:07 ROAD 2 006.JPG -rw-rw-r-- 1 seaquist edi 75342 jun 15 12:07 ROAD 3 002.JPG How can I fix this????? Thanks a lot Key fingerprint = A232 A22F AEF0 1988 6ACB 99AF A18F A220 BD2E 8CD8

« previous php.general (#238076) next »