Jump Page & Go to Previous page

Source: Internet
Author: User

1.php

<?php
Header (' location:2.php '); Echo can't be in front of it
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>"; Also OK

Back to previous page
echo "<script type=" Text/javascript ">history.back ();</script>";
Back to the last two pages
echo "<script type=" Text/javascript ">history.go ( -2);</script>";

$User = M (' User '); Instantiating a User object
$count = $User->where (' Status=1 ')->count ();//query satisfies the required total number of records
$Page = new \think\page ($count, 25);//Instantiate the total number of incoming records for the paging class and the number of records displayed per page (25)
$show = $Page->show ();//pagination display output//Paging data query Note the parameters of the Limit method use the properties of the Page class
$list = $User->where (' Status=1 ')->order (' Create_time ')->limit ($Page->firstrow. ', '. $Page->listrows )->select (); $this->assign (' list ', $list);//Assignment Data set
$this->assign (' page ', $show);//Assignment Paging output
$this->display (); Output template

Jump Page & Go to Previous page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.