|
Posted by Taras_96 on 01/29/07 13:32
Hi everyone,
Firstly, I would like to know if you can open chinese filenames under
win2000 using PHP 5.0? I have a file named 中国.php, and try to open it
using
fopen(‘中国.php','r');. I save the source file as UTF-8. I get the
error:
Warning: fopen(中国.php) [function.fopen]: failed to open stream: No
such file or directory in E:\Translation\Website
Development\webroot\testing\zhongguo.php on line 8
I have triple checked that the file exists. Changing the source code
encoding to 'Unicode (UCS-2)' leads to no output in the browser
window.
Does PHP even support opening chinese filenames?
Secondly, I'm having some trouble accessing filenames with chinese
characters that have been uploaded via HTTP. I'm using PHP 5 and
Apache 2.2. When I
attempt to upload a file with chinese filenames, the file name gets
mutated into dashes, pretty much matching the behaviour described at
'http://gallery.menalto.com/node/57709'. However, I need the original
filename (to store in a DB). The post on the manual website by
kweechang at yahoo dot com at http://au3.php.net/manual/en/
features.file-upload.php describes using javascript to set a hidden
field. This would work fine but for now I'm trying not to resort to
javascript on my webpage. Does anyone know how the original filename
can be retrieved without using javascript? Maybe there is a setting in
Apache?
Thanks
Taras
Navigation:
[Reply to this message]
|