急急急,php中post提交中文乱码!!
表单提交方式是post,提交text后中文总是乱码,不要告诉我设置heard()函数以及标签meta为utf-8,这两个都设置为了uft-8,可还是乱码,php-in中d...
表单提交方式是post,提交text后中文总是乱码,不要告诉我设置heard()函数以及标签meta为utf-8,这两个都设置为了uft-8,可还是乱码,php-in中default-charset也设置了utf-8,可还是乱码这是代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
</title>
</head>
<body>
<form action="ceshi.php" method = "post" enctype="multipart/form-data" >
<p>
name:<br/>
<input type="text" id="name" name="name" size = "20" maxlength= "40" />
</p>
<p>
Email:<br/>
<input type="text" id = "email" name="email" size="20" maxlength="40" />
</p>
<p>
<input type = "submit" id ="submit" name="submit" value="Go!" />
</p>
</form>
</body>
</html>
ceshi.php是:
<?php
header("Content-type: text/html; charset=utf-8");
if(isset($_POST['name'])){
$name = htmlentities($_POST['name']);
$email = htmlentities($_POST['email']);
printf("Hi %s! <br/>",$name);
printf("The address %s will soon be a spam-magnet!<br/>",$email);
}
?>求解决,万分感谢!!!! 展开
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
</title>
</head>
<body>
<form action="ceshi.php" method = "post" enctype="multipart/form-data" >
<p>
name:<br/>
<input type="text" id="name" name="name" size = "20" maxlength= "40" />
</p>
<p>
Email:<br/>
<input type="text" id = "email" name="email" size="20" maxlength="40" />
</p>
<p>
<input type = "submit" id ="submit" name="submit" value="Go!" />
</p>
</form>
</body>
</html>
ceshi.php是:
<?php
header("Content-type: text/html; charset=utf-8");
if(isset($_POST['name'])){
$name = htmlentities($_POST['name']);
$email = htmlentities($_POST['email']);
printf("Hi %s! <br/>",$name);
printf("The address %s will soon be a spam-magnet!<br/>",$email);
}
?>求解决,万分感谢!!!! 展开
摩杜云
2024-07-09 广告
2024-07-09 广告
提到提供发送邮件api的公司,摩杜云是一个不错的选择。摩杜云成立于2019年,依托于公司多年技术沉淀和强大的云计算研发实力,面向全世界各个国家和地区、企业组织和个人开发者,提供全球的云计算,大数据,人工智能等技术产品与服务.持续在云服务器,...
点击进入详情页
本回答由摩杜云提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |