Home  >  Article  >  php教程  >  TP5利用SESSION解决分页参数问题

TP5利用SESSION解决分页参数问题

WBOY
WBOYOriginal
2016-07-06 13:29:141047browse

TP5利用SESSION解决分页参数问题。
TP5利用SESSION解决分页参数问题。

添加SESSION$searchKeywords=input('get.searchKeywords');<br> <br>         if($searchKeywords){<br> <br>             Session::set('searchWareshoueKeywords',$searchKeywords);//利用SESSION来解决分页参数的问题<br> <br>         }        <br> <br>         $key=Session::get('searchWareshoueKeywords');查询:$list = Ports::where('country','like','%'.$key.'%')<br>                  ->where('status','1')<br>                 ->paginate(25);

云栖大会北京站:阿里技术专家难得出镜,这次一下来了100多位?!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn