Re: readdir problem with white spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ...

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


Replace whitespace with "&nbsp;" and the output will be right.

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)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux