kk Blog —— 通用基础


date [-d @int|str] [+%s|"+%F %T"]
netstat -ltunp
sar -n DEV 1

iconv与mb_convert_encoding的使用

https://blog.csdn.net/cihan7608/article/details/100621402

iconv

1
2
$getcontent = iconv("GBK", "UTF-8", '测试');
print_r($getcontent);

mb_convert_encoding

一般情况下用 iconv,只有当遇到无法确定原编码是何种编码,或者iconv转化后无法正常显示时才用mb_convert_encoding 函数

1
2
$getcontent = mb_convert_encoding($contents, "UTF-8", "auto");
print_r($getcontent);
1
$getcontent = mb_convert_encoding($contents, "UTF-8", 'UTF-8,GBK');

language, php

« Linux查看电池损耗 MySQL下的socket文件作用 »