目錄名為:中文使用readdir讀取后變成了:?D??
2 回答

寶慕林4294392
TA貢獻2021條經驗 獲得超8個贊
<?php
$di = 'E:\中文';
$di = iconv("UTF-8","gb2312",$di);
$handle = opendir($di);
$file = readdir($handle);
echo $file,"<br/>";
$file = readdir($handle);
echo $file,"<br/>";
$file = readdir($handle);
echo $file,"<br/>";
不過盡量少用甚至不用中文目錄和中文文件名?。鸷芏嗖槐匾穆闊?!
添加回答
舉報
0/150
提交
取消