Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php UTF8不起作用_Php - Fatal编程技术网

Php UTF8不起作用

Php UTF8不起作用,php,Php,我使用utf8_编码,它不会返回像ě,á,í,ř这样的字母 <?php error_reporting(0); define("ENCRYPTION_KEY", "!@#$%^&*"); $string = "ěčřžýáíéě"; // function encrypt($pure_string, $encryption_key) { $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB,MCRYP

我使用utf8_编码,它不会返回像ě,á,í,ř这样的字母

<?php
error_reporting(0);
define("ENCRYPTION_KEY", "!@#$%^&*");
$string = "ěčřžýáíéě"; //

function encrypt($pure_string, $encryption_key) {
    $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB,MCRYPT_RAND);
    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    $encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);
    return $encrypted_string;
}
?>

有什么问题吗?Thanx

你期望它返回什么?为什么你期望它返回那个?@GordonM我需要返回像Dveře jsou skleněné这样的句子。像ř等字母……你得到的是什么?@AndyIbanez,什么都没有