您好,我想知道在您的网页上显示变音符号的快捷方式是什么?我在考虑类似下面的代码,但我应该怎么做伪代码部分?
$language = $_POST['language'];
if ($language = "fi" ) {
$filename = "C:/xampp/htdocs/finnish.txt";
} else if ($language = "eng") {
$filename = "C:/xampp/htdocs/english.txt";
} else if ($language = "swe") {
$filename = "C:/xampp/htdocs/swedish.txt";
} else if ($language = "rus") {
$filename = "C:/xampp/htdocs/russian.txt";
}
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize($filename));
fclose ($fd);
$delimiter = "*";
$splitcontents = explode($delimiter, $contents);
$counter = 0;
foreach($splitcontents as $titles[$counter]) {
//PSEUDO CODE
CONVERT_UMLAUTS_TO_VIEVABLE_FORM($titles[$counter]);
$counter = $counter + 1;
}
答案 0 :(得分:4)
最好的方法是以UTF-8
编码存储和显示所有数据。