Question: All other outputs are normal, but the error output is garbled!
lsl
lsl 2020-05-12 00:55:49
0
8
1153

<?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); //Judge the database connection //if(!@mysqli_connect($dbhost, $ dbuser, $dbpw)){ //if(!@mysqli_connect("localhost", "root", "root", "13306")){ if(!$link){ echo 'Data connection failed, please check carefully inc /config.inc.php configuration'; echo "Error: Unable to connect to MySQL." . PHP_EOL; echo "Debugging errno: " . mysqli_connect_errno() ; exit(mysqli_connect_error()); } $link=mysqli_connect(DBHOST, DBUSER, DBPW); $mes_connect.="<p class='notice'>Database connection successful!

";

lsl
lsl

reply all(6)
凉官灰

Is your mysql character set set to UTF-8?

  • reply Once set, normal use of cmd mysql -u -p -P is a normal connection and normal reading and writing.
    lsl author 2020-05-13 11:08:55
lsl

2Picture2image.png

lsl

1.试了很多方法都乱码.png

lsl

Why can’t the picture be uploaded

  • reply What error is reported? Is the image size in the configuration file exceeded?
    Storms author 2020-05-14 11:30:25
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!