sgvsv/php-mass-files-converter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sgvsv/php-mass-files-converter

Composer 安装命令:

composer require sgvsv/php-mass-files-converter

包简介

Mass recursive convert files in given directory from given encoding to UTF-8

README 文档

README

Mass recursive convert files in given directory from given encoding to UTF. Class checks each file if it is already in UTF. In this case it will not be double-converted. It is possible to set file extensions to convert. And exclude some subdirs from converting.

Requirements

For providing modern PHP features such as setting types in method's signatures PHP7.1 or higher is required.

Installation

Best way to use this library is install it via composer:

composer require sgvsv/php-mass-files-converter

Usage example

After installing you can convert files:

require_once __DIR__ . '/vendor/autoload.php';

use \sgvsv\FilesConverter\Converter;

//Argument is a directory to convert
//c:\\my\\dir in windows or /path/to/dir in linux
$converter = new Converter("c:\\my\\dir");

//Files with /vendor/ or /.git/ substrings in their paths will be ignored
$converter->setIgnoredPaths(['/vendor/', '/.git/']);

//Files with other extensions will be ignored
$converter->setExtensions(['txt', 'php']);

//Output list of files and detected encodings
echo $converter->preview();

//Files that wasn't in UTF will be replaced with converted files
//File that already was in UTF will not be changed
$converter->convert();

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固