Home > Backend Development > PHP Tutorial > EPP调试乱码解决方法

EPP调试乱码解决方法

WBOY
Release: 2016-06-13 13:09:49
Original
1414 people have browsed it

EPP调试乱码
跟着PHP视频写了一段乱码,MYSQL数据库乱码是搞定了,但是用EPP调试时,显示的中文是乱码(我文件等都用UTF8),如果用火狐浏览器只要设置UTF-8即可,但是EPP调试时不知道哪里设置



$conn=@mysql_connect("localhost","root","") or die("连接错误");
mysql_select_db("test",$conn);

if($_POST['submit']){
 mysql_query("set names utf8");
  $sql="insert into message (id,user,title,content,lastdate) ".
  "values('','$_POST[user]','$_POST[title]','$_POST[content]',now())";

 
mysql_query($sql,$conn);
}
?>



用户:

标题:

内容:





其中“用户”,“标题”,“内容”用EPP调试时都是乱码




------解决方案--------------------
你的程序文件不是用 utf-8 编码保存的
------解决方案--------------------
应该是编码不一致!~~你看下本地编码!~~
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template