On Sun, 2010-10-17 at 21:56 +0800, 肖晗 wrote:
> There is a "download" directory(to provide download links) in my site.
> Some of the filenames contain Chinese characters, which, however cannot be
> Is there anything I can do to solve problem?
> Thanks in advance!
The short answer is "yes, remove the Chinese characters", however, I
think you were looking for something a little more automatic?
If the URL itself is causing the problem, maybe you could use the
urlencode() and urldecode() functions to make the filename for the URL
Another alternative that I've used before is to give each file an entry
in a DB and use a moniker to identify the file. The DB can handle all
sorts of extra functions in the future, such as allowing only specific
users to access a file, storing multiple versions of the same file
bearing the same name (on the server each version has a unique name, the
user need only know that they're requesting template.doc, version 3,
etc) and many other things.