Re: readdir problem with white spaces
| From: | Barry | Date: | Thu, 15 Jun 2006 12:26:55 +0000 |
| Subject: | Re: readdir problem with white spaces | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238079@lists.php.net to get a copy of this message | ||
Francisco Morales schrieb:
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 ...The browser don't outputs every whitespace (which is good!). This might handle it ;) Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)so if I have on the file system . "ROAD 1 005.JPG" or "ROAD 1 0005.JPG" php readdirreturn 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 Replace whitespace with " " and the output will be right.