php 字符转换
插入数据
读取数据
乱码
echo '/************addcslashes************/';$str = 'abcdfegadsf\'asdfasdfa';echo addcslashes($str,'\'');echo '/************htmlentities*************/';$str = 'abcdfe & s ha \'asdfasdfa';echo htmlentities($str,ENT_NOQUOTES);echo '/************iconv*************/';$str = ' ‘ ’ ???“?”??¨???????? ? ?? ? ? ? ? ? @ @Wei?, Goldmann, G?bel, Weiss, G?the, Goethe und G?tz ? aa';//change encoding from utf-8 to asciiecho iconv('utf-8','ascii//TRANSLIT//IGNORE',$str);
?