首页 > 解决方案 > 相同的代码,但字符集不适用于 index.php

问题描述

我在 index.php 页面上有一个有趣的问题。我的页面具有完全相同的代码(尝试复制所有其他页面以尝试在 index.php 上),但在 index.php 上,土耳其语字符显示不正确。即使使用完全相同的代码。什么会导致这种情况?只有 index.php 显示错误。

尝试了相同的代码,但也许你想检查我的头标签。

<head>
<link rel="stylesheet" href="bootstrap-5.0.0-beta2-dist/css/bootstrap.css">
<script src="bootstrap-5.0.0-beta2-dist/js/bootstrap.bundle.js" ></script>
<link rel="stylesheet" href="css/main.css">
<script src="js/jquery-3.5.1.min.js"></script>
    
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta HTTP-EQUIV="Content-language" CONTENT="tr">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>title</title>
<meta name="description" content="deneme">
<meta charset="utf-8">
</head>

标签: phphtml

解决方案


也许您必须查看网络服务器的设置?例如 .htaccess 或 /etc/apache2/apache2.conf...

并检查:您是否在 index.php 中的“html 块”之前使用 header() 或 no...

截图 [1]:https ://i.stack.imgur.com/U3FB2.png


推荐阅读