How to batch replace UTF-8 encoded files using batch-replace_utf8.php?
- 内容介绍
- 文章标签
- 相关推荐
本文共计771个文字,预计阅读时间需要4分钟。
phpbatch-replace_utf8.php 函数读取目录内容,跳过特定文件,并打印出文件路径。代码如下:
phpfunction batchReplaceUtf8() { if ($v==.) || ($v==..) { continue; } $file=$d . '/' . $v; if (is_dir($file)) { echo + $v ; hx_dirtree($file); } else { $ext=substr(strrchr($v, .), 1); if (in_array($ext, $arrext)) { echo + $file ; } }}
batch-replace_utf8.php

