当前位置: 首页>>代码示例>>PHP>>正文


PHP SearchEngine::performSearch方法代码示例

本文整理汇总了PHP中SearchEngine::performSearch方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchEngine::performSearch方法的具体用法?PHP SearchEngine::performSearch怎么用?PHP SearchEngine::performSearch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchEngine的用法示例。


在下文中一共展示了SearchEngine::performSearch方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

                }
                echo "</select> ";
                echo "<input type=submit value='Show Latest'>";
                echo "</form>\n";
            } else {
                echo "</td></tr></table></div>";
                // Set the Sub to equal the main for groups that don't have subs.
                $_REQUEST["subGenre"] = $mainGenre;
                echo $sEngine->getLatest();
            }
        } else {
            echo "</td></tr></table></div>";
            if (array_key_exists("LATEST", $_REQUEST) && $_REQUEST["LATEST"] == "1") {
                echo $sEngine->getLatest();
            } else {
                echo $sEngine->performSearch($searchterm);
            }
        }
    } else {
        // there was an error connecting
        echo "</td></tr>";
        echo "<tr><td><br><br><div align=center><strong>" . $sEngine->msg . "</strong></div><br><br></td></tr>";
        echo "</table></div>";
    }
} else {
    // there was an error connecting
    echo "</td></tr>";
    echo "<tr><td><br><br><div align=center><strong>Search Engine not installed.</strong></div><br><br></td></tr>";
    echo "</table></div>";
}
DisplayFoot();
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:torrentSearch.php

示例2: initSQL

<?php

include 'include/config.php';
include 'classes/databasePDO.php';
include 'classes/class.search.php';
include 'classes/class.searchEngine.php';
initSQL($config);
echo "\nPlease enter at least the first 3 letters of the lodging you are searching for and press enter to start: \n";
$handler = fopen('php://stdin', 'r');
$toSearch = trim(fgets($handler));
fclose($handler);
if (empty($toSearch)) {
    echo "\nNo text provided. Ending.\n";
    exit(0);
}
if (strlen($toSearch) < 3) {
    echo "\nMinimum length size must be 3 characters.\n";
}
$clean = filter_var($toSearch, FILTER_SANITIZE_STRING);
mb_internal_encoding("UTF-8");
$results = SearchEngine::performSearch(mb_substr($clean, 0, 3));
if (count($results) == 0) {
    echo "No results found. Ending.\n";
    exit(0);
}
echo "Match(s) found!\n" . "------------\n";
foreach ($results as $result) {
    echo $result . "\n";
}
exit(0);
开发者ID:rogelido,项目名称:traveltest,代码行数:30,代码来源:script.php

示例3: array

    } else {
        // Search Engine ready to go
        $mainStart = true;
        $catLinks = '';
        $tmpCatLinks = '';
        $tmpLen = 0;
        $link_list = array();
        foreach ($sEngine->getMainCategories() as $mainId => $mainName) {
            array_push($link_list, array('searchEngine' => $searchEngine, 'mainId' => $mainId, 'mainName' => $mainName));
        }
        $tmpl->setloop('link_list', $link_list);
        $mainGenre = tfb_getRequestVar('mainGenre');
        $subCats = $sEngine->getSubCategories($mainGenre);
        if (empty($mainGenre) && array_key_exists("subGenre", $_REQUEST) || count($subCats) <= 0) {
            $tmpl->setvar('no_genre', 1);
            $tmpl->setvar('performSearch', array_key_exists("LATEST", $_REQUEST) && $_REQUEST["LATEST"] == "1" ? $sEngine->getLatest() : $sEngine->performSearch($searchterm));
        } else {
            $mainGenreName = $sEngine->GetMainCatName($mainGenre);
            $tmpl->setvar('mainGenreName', $mainGenreName);
            $list_cats = array();
            foreach ($subCats as $subId => $subName) {
                array_push($list_cats, array('subId' => $subId, 'subName' => $subName));
            }
            $tmpl->setloop('list_cats', $list_cats);
        }
    }
}
//
$tmpl->setvar('_SEARCH', $cfg['_SEARCH']);
//
tmplSetTitleBar("Torrent " . $cfg['_SEARCH']);
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:torrentSearch.php

示例4: initSQL

<html>
<?php 
include 'include/config.php';
include 'classes/databasePDO.php';
include 'classes/class.search.php';
include 'classes/class.searchEngine.php';
initSQL($config);
$handler = fopen('php://stdin', 'r');
$toSearch = "وا";
mb_internal_encoding("UTF-8");
$results = SearchEngine::performSearch(mb_substr($toSearch, 0, 3));
if (count($results) == 0) {
    echo "Keyword(s) not found. Ending.\n";
    exit(0);
}
echo "<pre>Match found!\n" . "------------\n</pre>";
foreach ($results as $result) {
    echo $result . "\n";
}
?>
</html><?php 
exit(0);
开发者ID:rogelido,项目名称:traveltest,代码行数:22,代码来源:scriptNonInt.php


注:本文中的SearchEngine::performSearch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。