search

Home  >  Q&A  >  body text

Report 404 after clicking next page

Jump to the next page where a href=page.php, but where is page.php written in this code? I don’t quite understand, I hope you can explain it to me. My table name is users, not user. 1.png

❤非酋❤非酋2697 days ago1453

reply all(2)I'll reply

  • 按键盘手指磨破皮

    按键盘手指磨破皮2017-09-05 22:57:10

    page.php is a PHP file. If you don’t have this file, it will definitely report 404. Can you just create a file with the same name? The following page is a parameter or variable, and $page is the value of page. page.php is another file. You definitely can’t see the code in this file.

    reply
    0
  • ❤非酋

    Create a separate page.php. If I click on the next page, it will jump directly to the empty page of page.php. . . What do I need to write in page.php?

    ❤非酋 · 2017-09-07 22:49:57
    ❤非酋

    Create a separate page.php. If I click on the next page, it will jump directly to the empty page of page.php. . . What do I need to write in page.php?

    ❤非酋 · 2017-09-07 22:49:59
    按键盘手指磨破皮

    You can write whatever you want to display when jumping to the next page. If you don't want to jump to the page.php page but display it on this page, just remove page.php and just use the ?page= parameter. Write a variable $next = $_GET['page']+1 above, and then the next page is?page=$next. In this way, when you click the next page, the value of page is +1. Then the limit of the database is the current page number (also It is the value of page) -1 Then * how much data do you want to display? For example, put the result of this operation into a variable a $a = ($_GET['page'] - 1)*10 Mysql writes select * from table name like this limit $a,10. Just put the fetched results on the page.

    按键盘手指磨破皮 · 2017-09-08 09:38:39
  • 风521

    风5212017-09-05 15:22:49

    The file name of this code should be called page.php

    reply
    1
  • Cancelreply