始于此, 终于斯
文章31
标签0
分类13

Mac安装PHP

brew untap homebrew/php
brew untap exolnet/deprecated
brew cleanup
brew tap shivammathur/php
brew install shivammathur/php/php@7.1
brew services restart shivammathur/php/php@7.1
brew link --overwrite --force shivammathur/php/php@7.1

https://github.com/shivammathur/homebrew-php

git差异打包

git diff 1a5a658e 64ee6ed3 --name-only | xargs zip update.zip

字符转码

// 使用默认字符编码识别可能导致识别错误
//$encoding = mb_detect_encoding($string, mb_detect_order(), true);
// 默认mb_detect_order() => ASCII,UTF-8

// 手动指定识别顺序
$encoding = mb_detect_encoding($string, 'GB2312,GBK,ASCII,UTF-8,ISO-8859-15', true);
if ($encoding) {
    $string = mb_convert_encoding($string, "UTF-8", $encoding);
} else if (mb_detect_encoding($string, 'GB2312', true)) {
    $string = mb_convert_encoding($string, "UTF-8", 'GB2312');
} else {
    $string = mb_convert_encoding($string, "UTF-8", 'GBK');
}

uni使用iconfont [单色-多色混合]

# 全局安装iconfont转换工具
npm install -g iconfont-tools

# 进入iconfont解压根目录
cd iconfont
# 执行
iconfont-tools

只使用 iconfont-weapp-icon.css 文件
需要多色字体混合的, 按需把单色字体class改为原Unicode即可


安装Flutter