Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: Swish->query - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SwishResult->getMetaList" width="11" height="7"/> <Swish->prepare
Last updated: Fri, 10 Oct 2008

view this page in

Swish->query

(No version information available, might be only in CVS)

Swish->queryクエリを実行し、結果オブジェクトを返す

説明

object Swish->query ( string $query )
警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。

デフォルトのパラメータで検索を行うためのお手軽なメソッドです。

パラメータ

query

クエリ文字列。

返り値

SwishResults オブジェクトを返します。

エラー / 例外

エラー時に SwishException をスローします。

例1 基本的な Swish->query() の例

<?php

try {

    
$swish = new Swish("index.swish-e");
    
$results $swish->query("test query");

    echo 
"Found: "$results->hits" hits\n";

} catch (
SwishException $e) {
    echo 
$e->getMessage(), "\n";
}

?>

上の例の出力は、たとえば 以下のようになります。

Found: 1 hits



add a note add a note User Contributed Notes
Swish->query
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites