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

javascript - addthis share facebook and google+ url -

java - Simulate the tossing of a coin three times and print out the percentage of cases in which one gets three tails -

c++ - Class declaration error at explicit keyword -