|
@@ -0,0 +1,36 @@
|
|
|
+<?php
|
|
|
+//解决teleport 下载的中文文件名乱码
|
|
|
+//项目文件放在teleport文件夹
|
|
|
+//访问:http://others.yoqi.me/convert.php
|
|
|
+function listDir($dir)
|
|
|
+{
|
|
|
+ echo "start!";
|
|
|
+ if(is_dir($dir))
|
|
|
+ {
|
|
|
+ if ($dh = opendir($dir))
|
|
|
+ {
|
|
|
+ while (($file = readdir($dh)) !== false)
|
|
|
+ {
|
|
|
+ if((is_dir($dir."/".$file)) && $file!="." && $file!="..")
|
|
|
+ {
|
|
|
+ rename($dir."/".$file,$dir."/".mb_convert_encoding($file,"GBK", "UTF-8"));
|
|
|
+ listDir($dir."/".$file."/");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if($file!="." && $file!="..")
|
|
|
+ {
|
|
|
+ rename($dir."/".$file,$dir."/".mb_convert_encoding($file,"GBK", "UTF-8"));
|
|
|
+ echo $dir."/".$file;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ closedir($dh);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ echo "finish!";
|
|
|
+}
|
|
|
+//开始运行
|
|
|
+listDir("E:/web/iis/teleport");
|
|
|
+
|
|
|
+?>
|