本文整理汇总了PHP中search::perform_search方法的典型用法代码示例。如果您正苦于以下问题:PHP search::perform_search方法的具体用法?PHP search::perform_search怎么用?PHP search::perform_search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search
的用法示例。
在下文中一共展示了search::perform_search方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
require_once "include/include.php";
//if the file exist physically, open it as long as it is a file not a directory
if (file_exists(BASEDIR . $uri) and strpos(array_pop($uri_array), ".") !== FALSE) {
include BASEDIR . $uri;
exit;
}
//open link to database server and select right database
$link_identifier = mysql_connect(SERVER, USER, PASS) or die("Keine Verbindung zur Datenbank!!!!");
mysql_select_db(DATABASE, $link_identifier);
//check, what's the request for...
switch ($uri_array[0]) {
case "suche":
require_once "search/search.php";
if (isset($_GET)) {
$module = new search($link_identifier);
$module->perform_search();
}
break;
default:
require_once "articles/view.php";
$module = new view($uri_array, $link_identifier);
$module->generate();
break;
}
//parse the navigational contents
include_once "parser/templ_parser.php";
$parser = new templ_parser("nav.html");
$nav = $parser->parse();
//main parse, include of content
$parser = new templ_parser("main.html");
$output = $parser->parse(array("navigation" => $nav, "content" => $module->output()));