note 75620 added to function.scandir
| From: | MichaelfromYokohama at osu1 dot php dot net | Date: | Fri, 08 Jun 2007 08:43:38 +0000 |
| Subject: | note 75620 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127291@lists.php.net to get a copy of this message | ||
Re: phdwight comments about Japanese.
As far as I can see, readdir simply sucks up the byte stream that the OS generates and shots that at
the browser. At any rate, it works fine on the PHP4 server I'm using.
The key is matching the "Content-type" headers and html / xml "encoding" values
to what the OS is generating.
This gets more complex if you think of a folder that can be accessed by a samba share. The Japanese
files saved from a windows client will be have the file name encoded in ShiftJIS. Any files created
locally on the system would be in UTF8 (on a UTF8 system). This results in a jumbled up list of UTF8
and ShiftJIS file names in the same directory. Try displaying that on the one HTML page! It gets
messy.
The real issue here is that basically any random stream of bytes is a valid file name on a linux
box. Good luck!
----
Server IP: 69.147.83.197
Probable Submitter: 202.221.185.98
----
Manual Page -- http://www.php.net/manual/en/function.scandir.php
Edit -- https://master.php.net/note/edit/75620
Del: integrated -- https://master.php.net/note/delete/75620/integrated
Del: useless -- https://master.php.net/note/delete/75620/useless
Del: bad code -- https://master.php.net/note/delete/75620/bad+code
Del: spam -- https://master.php.net/note/delete/75620/spam
Del: non-english -- https://master.php.net/note/delete/75620/non-english
Del: in docs -- https://master.php.net/note/delete/75620/in+docs
Del: other reasons-- https://master.php.net/note/delete/75620
Reject -- https://master.php.net/note/reject/75620
Search -- https://master.php.net/manage/user-notes.php