高分求助分页问题

如何实现象sohu的搜索引擎的分页方式。
http://site.search.sohu.com/website.jsp?key_word=1&begin=270&numpage1=30
越详细越好!
---------------------------------------------------------------

去看 PHPBB 的搜索代码 search.php
---------------------------------------------------------------

注意参数的传递

 1<td class="cont" colspan="2" height="35" nowrap="">  您输入的关键词:<font color="red">php   
 2</font> 搜索结果:<a href="http://general.search.sohu.com/sortsearch.jsp?key_word=php">类目</a>   
 3  
 4\---------------------------------------------------------------   
 5  
 6&lt;?php   
 7/***************************************************************************   
 8* search.php   
 9* -------------------   
10* begin : Saturday, Feb 13, 2001   
11* copyright : (C) 2001 The phpBB Group   
12* email : [email protected]   
13*   
14* $Id: search.php,v 1.72.2.4 2002/05/13 01:30:59 psotfx Exp $   
15*   
16*   
17***************************************************************************/   
18  
19/***************************************************************************   
20*   
21* This program is free software; you can redistribute it and/or modify   
22* it under the terms of the GNU General Public License as published by   
23* the Free Software Foundation; either version 2 of the License, or   
24* (at your option) any later version.   
25*   
26***************************************************************************/   
27  
28define('IN_PHPBB', true);   
29$phpbb_root_path = './';   
30include($phpbb_root_path . 'extension.inc');   
31include($phpbb_root_path . 'common.'.$phpEx);   
32include($phpbb_root_path . 'includes/bbcode.'.$phpEx);   
33include($phpbb_root_path . 'includes/functions_search.'.$phpEx);   
34  
35//   
36// Start session management   
37//   
38$userdata = session_pagestart($user_ip, PAGE_SEARCH);   
39init_userprefs($userdata);   
40//   
41// End session management   
42//   
43  
44//   
45// Define initial vars   
46//   
47if ( isset($HTTP_POST_VARS['mode']) ¦ ¦ isset($HTTP_GET_VARS['mode']) )   
48{   
49$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];   
50}   
51else   
52{   
53$mode = '';   
54}   
55  
56if ( isset($HTTP_POST_VARS['search_keywords']) ¦ ¦ isset($HTTP_GET_VARS['search_keywords']) )   
57{   
58$search_keywords = ( isset($HTTP_POST_VARS['search_keywords']) ) ? $HTTP_POST_VARS['search_keywords'] : $HTTP_GET_VARS['search_keywords'];   
59}   
60else   
61{   
62$search_keywords = '';   
63}   
64  
65if ( isset($HTTP_POST_VARS['search_author']) ¦ ¦ isset($HTTP_GET_VARS['search_author']))   
66{   
67$search_author = ( isset($HTTP_POST_VARS['search_author']) ) ? $HTTP_POST_VARS['search_author'] : $HTTP_GET_VARS['search_author'];   
68}   
69else   
70{   
71$search_author = '';   
72}</td>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus