php - 文件 PHP 中的表单不发布 UTF-8

标签 php html sql

我使用 PHP 创建常见问题解答表单,但它不显示 UTF-8,尽管 SQL 数据为 utf-8_general_ci index image error font utf-8 sql error font utf-8

我有 2 个文件:faq.php 和 index.php

最佳答案

恕我直言,有几个地方可能会导致问题:

  • 用表单编码页面

    <meta http-equiv="content-type" content=" text/html; charset=utf-8" /> 
    
  • 表单本身的表单编码

    <form accept-charset="utf-8"> 
    
  • SQL连接的编码

    charset utf8;
    

关于php - 文件 PHP 中的表单不发布 UTF-8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17134367/

相关文章:

php - 在没有 PHPmyAdmin 的情况下将 .sql 文件导入数据库

php - 如何在 Typo3 file.inc 中链接自己的 css/php 文件

html - 使用 phpmailer 发送整个 html 页面

sql - 选择 SQL Server 中每个唯一组合的最后一行

sql - 在 SQL 中使用两个 DISTINCT 语句

php - 内存限制耗尽 flysystem/src/Util/MimeType.php,如何找到文件路径?

php - 当 PHP 精度设置为 18+ 时 round() 中断

html - 使导航下方的 'width: 100%'图像成为手机上导航栏的背景

javascript - 如何通过添加新的指定选项来创建依赖的JS下拉列表?

mysql - 将 UDF 从 MS SQL Server 移植到 MySQL 会引发异常,不正确的双值