在我的新pc上替换我的项目后,它说"mysqli_fetch_array()期望参数1是mysqli_resu


After i replace my project on my new pc it says "mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in "

在我的新电脑上替换了我的项目后,它显示

mysqli_fetch_array()期望参数1为mysqli_result布尔值

代码

 <?php include('cpanel/databaseconnection.php');?>
     <div class="container-fiulde">
    <header class="header-login-signup">
    <div class="header-limiter">
    <h1><a href="index.php">Afg<span>Bano</span></a></h1>
        <nav>
        <ul>
        <?php 
            $qpage = "select id,name from category";
           $page_query = mysqli_query($databaseconnection,$qpage);
          while ($tittle = mysqli_fetch_array($page_query))
           {?>
        <li class="select"> <a href="<?php echo  
         "show.php?id=".$tittle['id'] ?>"> 
          <?php echo $tittle ['name'];?></a></li>
              <?php }
              ?>
                    </nav>
                <ul>
        <li><a href="admin/login.php">Login</a></li>
        </ul>
        </ul>
            </div>
         </header>
        </div>
       </div>

查询失败,返回false。看看为什么

if (!$qpage) {
    printf("Error: %s'n", mysqli_error($databaseconnection));
    exit();
}

这里也有错别字。在$tittle后面有额外的空间。

<?php echo $tittle ['name'];?>
应该

<?php echo $tittle['name'];?>