php - filesize stat failed -


i have php script running, loops through files in specified directory. returns name, filesize, modified_date etc. each file finds. script returns info of files correctly, except ones have chinese or other symbols in it. famous filesize stat failed error (warning). how solve this, without changing filenames?

i provide code if needed.

i've encountered before; file system encoding difficult , hard predict, works me:

stat(iconv('utf-8', 'iso-8859-1', $filename)); 

it converts filename utf8 iso8859-1 , tries.

this tricky though, @ page juicy dialog in post comments: http://www.rooftopsolutions.nl/blog/filesystem-encoding-and-php


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -