求问:其它输出都正常,就是错误输出是乱码!
问题描述
<?php/** * Created by runner.han * There is nothing new under the sun */header('Content-type:text/html;charset=utf-8'); include_once 'header.php';include_once 'inc/config.inc.php';$dbhost=DBHOST;$dbuser=DBUSER;$dbpw=DBPW;$dbname=DBNAME;$dbport=DBPORT;$mes_connect='';$mes_create='';$mes_data='';$mes_ok='';if(isset($_POST['submit'])){ $link = mysqli_connect($dbhost, $dbuser, $dbpw ,$dbport); //判断数据库连接 //if(!@mysqli_connect($dbhost, $dbuser, $dbpw)){ //if(!@mysqli_connect("localhost", "root", "root", "13306")){ if(!$link){echo '数据连接失败,请仔细检查inc/config.inc.php的配置'; echo "Error: Unable to connect to MySQL." . PHP_EOL;echo "Debugging errno: " . mysqli_connect_errno() ;echo "Debugging error: " . mysqli_connect_error() ;exit; //exit(mysqli_connect_error()); } $link=mysqli_connect(DBHOST, DBUSER, DBPW); $mes_connect.="<p class='notice'>数据库连接成功!
";问题解答
回答1:你mysql字符集设置是UTF-8吗?
回答2:2图片2
回答3:1.
回答4:为什么图片上传不了
回答5:回答6: