remote_addr(::1)不返回IPv4地址127.0.0.1的解决办法
摘要:Turn off IPv6 in Apache To turn off IPv6 in Apache, just change the Listen directive to: Listen 0.0.0.0:80 This will limit Apache to listening only to
阅读全文
posted @
2020-03-18 16:58
caigan
阅读(1720)
推荐(0) 编辑
php转换字符串编码 iconv与mb_convert_encoding的区别
摘要:PHP判断字符串编码函数mb_detect_encoding总结 iconv — Convert string to requested character encoding(PHP 4 >= 4.0.5, PHP 5) mb_convert_encoding — Convert character
阅读全文
posted @
2020-03-16 13:58
caigan
阅读(746)
推荐(0) 编辑
PHPExcel获取CSV文件数据不准确,用以下方法获取
摘要:protected function csvFileRead($csvName) { $buffer = file_get_contents($csvName); //ファイルのエンコードチェック $buf = mb_convert_encoding($buffer, "utf-8", "SJIS-
阅读全文
posted @
2020-03-11 14:08
caigan
阅读(403)
推荐(0) 编辑
日文SJIS编码字符串字符数获取方法
摘要://最大桁数 $cellData = "イシグロ シズ"; $strLength = mb_strwidth($cellData, mb_detect_encoding($cellData));
阅读全文
posted @
2020-03-11 08:52
caigan
阅读(1344)
推荐(0) 编辑