解析错误:语法错误,第87行的C:\ xampp \ htdocs \ primarypro \ index.php中的意外文件结束

时间:2017-07-20 03:48:27

标签: php

//这里我尝试从数据库读取数据,但它显示Parse错误:语法错误,在第87行的C:\ xampp \ htdocs \ primarypro \ index.php中意外结束文件。我检查了三次,但我没有找错了。请帮助找到此问题的错误或解决方案,

 <?php include "inc/header.php"; ?>
<?php
spl_autoload_register(function ($class){

    include"classes/".$class.".php";
});



?>
<?php
$user = new student();

?>


<section class="mainleft">
<form action="" method="post">
 <table>
    <tr>
        <td>Name: </td>
        <td><input type="text" name="name" required="1"/></td>    
    </tr>

    <tr>
       <td>Department: </td>
        <td><input type="text" name="name" required="1"/></td>
    </tr>

    <tr>
      <td>Age: </td>
        <td><input type="text" name="name" required="1"/></td>
    </tr>
    <tr>
      <td></td>
        <td>
        <input type="submit" name="submit" value="Submit"/>
        <input type="reset" value="Clear"/>
        </td>
    </tr>
  </table>
</form>
</section>



<section class="mainright">
  <table class="tblone">
    <tr>
        <th>No</th>
        <th>Name</th>
        <th>Department</th>
        <th>Age</th>
        <th>Action</th>
    </tr>

      <?php

      $i=0;
      foreach($user->readAll() as $key => $value){
          $i++;



   ?>



    <tr>
        <td><?php echo $i;?></td>
        <td><?php echo $value['name']; ?></td>
        <td><?php echo $value['dept']; ?></td>
        <td><?php echo $value['age']; ?></td>
        <td>
        <a href="">Edit</a> ||
        <a href="">Delete</a>
        </td>
    </tr>
<?php}?>

  </table>
</section>

<?php include "inc/footer.php"; ?>

2 个答案:

答案 0 :(得分:0)

不太确定代码中的第87行是哪一行,但我认为问题是

save(){

   this.amessages.concat( this.rmessages.filter(function(x) { return x.selected}));
   this.rmessages =  this.rmessages.filter(function (x) { return !x.selected;})

}

应该是

<?php}?>

答案 1 :(得分:0)

试试这个

    function ensureAuthenticated(req, res, next) {
    if (req.isAuthenticated()) { 
         return next();
        }
    res.redirect('/login')
    }