PHP转换字符编码为utf-8function strToUtf8($str){ $encode = mb_detect_encoding($str, array("ASCII",'UTF-8',"GB2312","GBK",'BIG5')); if($encod
PHP二进制与字符串之间的相互转换<?php header("Content-type: text/HTML; charset=utf-8"); /** * 将字符串转换成二进制 * @param type $str * @return type */ function StrToBin($str){ //1.列出每个字