我在頁面中使用分頁和優勢搜索選項。如何將分頁的get參數添加到url的末尾?
搜索工作很好。例如,當我使用搜索時,url是這樣的:
http://example.com/category/contents?**title=test&year=2015&author=test**
沒關係。但是當我使用分頁鏈接時,所有搜索參數都消失了。
http://example.com/category/contents?**page=3**
我該如何解決這個問題?
我想這樣做:
http://example.com/category/contents?title=test&year=2015&author=test&**page=3**
編輯: 好吧,我使用像現在:
$parameters = "";
if(isset($_GET["x_param"])){
$parameters .= "¶metername=".$_GET["x_param"]
}
而且我加入$參數變量的分頁鏈接結束。
?page=xx".$parameters
我做到了。這是不好的方式還是好的? –
不,這是不錯的方式來使用這樣的URL參數。 –
好的,謝謝! –