header("Content-type:text/html;charset=utf-8"); $secret1 = "rZa9GneIzd9MNyoTv/Ghpk2V6ZHD0KeQC7t0ymEH7cI="; $secret2 = 'rZa9GneIzd9MNyoTv/Ghpk2V6ZHD0KeQC7t0ymEH7cI='; $secret3 = 'rZa9GneIzd9MNyoTv/Ghpk2V6ZHD0KeQC7t0ymEH7cI='; var_dump(trim($secret1)); echo "<br>"; var_dump(trim($secret2)); echo "<br>"; var_dump($secret3); echo "<br>"; echo mb_detect_encoding($secret1, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5")); echo "<br>"; echo mb_detect_encoding($secret2, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5")); echo "<br>"; echo mb_detect_encoding($secret3, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5"));
Rentetan yang sama memaparkan pengekodan yang berbeza apabila mengesan pengekodan Apakah masalahnya?
Untuk set aksara yang berbeza, akan ada skema pengekodan yang berbeza Yang semasa ialah UTF8