gpt4 book ai didi

php - HTML表单的字符编码

转载 作者:行者123 更新时间:2023-11-28 03:27:34 24 4
gpt4 key购买 nike

我在 iso-8859-1 中有一个页面

<meta http-equiv=content-type content="text/html; charset=iso-8859-1">

并且页面中有两个表单,一个表单提交到同一个页面,另一个表单提交到不同的页面

<form method='post' action='post.php'>
</form>

我将以不同语言添加的评论插入到 post.php 页面并将其插入。在 Firebug 中,当我看到它说的字符集时

application/x-www-form-urlencoded; charset=UTF-8

由于不同的编码,导致发布的数据被正确保存的问题

有没有办法将表单的编码更改为 iso-8859-1,这对我有用编码

最佳答案

你的表单所在的页面最好使用utf-8,还有post.php
所有页面都应该有相同的字符集

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

关于php - HTML表单的字符编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20208949/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com