dongtang8678 2016-07-15 13:02
浏览 43
已采纳

为什么不使用PHP和MySQL在我的浏览器上显示字母'ST'

I am making a website and I am getting data from my database(local database for testing of course) and for some reason, the two letter st won't show up on my browser. I am using PHP and MySQL with phpMyAdmin.

I have tried this with several words like: "Test" just shows "Te", "String" just shows "ring" and even with st in the middle of a word like "Abstract" just shows "Abract". I have tried searching for answers but i couldn't find anything at all!

$DBConnect = mysqli_connect("127.0.0.1", "root", "");
if ($DBConnect === FALSE) {
    echo "<p>Unable to connect to the database server.</p>" . "<p>Error code " . mysqli_errno() . ": " . mysqli_error() . "</p>";
} else {
    $DBName = "cms";
    $TableName = "messages";
    if (!mysqli_select_db($DBConnect, $DBName)) {
        echo "<p>Unable to connect to the $DBName database!</p>";
    } else {
        $SQLstring = "SELECT * FROM $TableName";
        $sql = mysqli_query($DBConnect, $SQLstring);
        $Message = mysqli_fetch_array($sql);
        if ($Message === FALSE) {
            echo "Unable to execute the query." . "Error code " . mysqli_errno($DBConnect) . ": " . mysqli_error($DBConnect) . "";
        } else if (mysqli_num_rows($sql) == 0) {
            echo "<h1>School of Healthcare and Wellbeing</h1>";
        } else {
            echo "<h1>" . $Message['message'] . "</h1>";
        }
    }
}
  • 写回答

1条回答 默认 最新

  • dongmiao260399 2016-07-15 13:47
    关注

    Ok, here is the thing.. i switched my font to standard Arial and it works perfectly. Apparently there is some kind of bug with the font 'Radley'. I even tried several other fonts like Times and Courier. These fonts work fine! Anyway, it is fixed now!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动