zoukankan      html  css  js  c++  java
  • 跳转页面&回到上一页

    1.php

    <?php
    header('Location:2.php'); //echo不能在其前面
    echo '1';

    2.js

    <?php
    echo '2';
    echo '<meta http-equiv="refresh" content="10;url=1.php">';

    3.js

    <?php
    echo '4';
    echo "<script>location='1.php';</script>";
    echo '3';
    //echo "<script>location.href='1.php';</script>"; 也行

    //回到上一页
    //echo "<script type="text/javascript">history.back();</script>";
    //回到上两页
    //echo "<script type="text/javascript">history.go(-2);</script>";

    $User = M('User'); // 实例化User对象
    $count = $User->where('status=1')->count();// 查询满足要求的总记录数
    $Page = new ThinkPage($count,25);// 实例化分页类 传入总记录数和每页显示的记录数(25)
    $show = $Page->show();// 分页显示输出// 进行分页数据查询 注意limit方法的参数要使用Page类的属性
    $list = $User->where('status=1')->order('create_time')->limit($Page->firstRow.','.$Page->listRows)->select();$this->assign('list',$list);// 赋值数据集
    $this->assign('page',$show);// 赋值分页输出
    $this->display(); // 输出模板

  • 相关阅读:
    wtk2.1的问题
    扫雷大体完成了
    手机操作系统龟兔赛跑 Symbian深信将打败微软
    Practical UML™ A HandsOn Introduction for Developers
    有意思
    进展
    扫雷完成了:)
    Linux
    有关msn的api的两个网站
    csdn中讨论j2me之前途....
  • 原文地址:https://www.cnblogs.com/hfdp/p/5359823.html
Copyright © 2011-2022 走看看