コード例 #1
0
ファイル: test.php プロジェクト: siddht1/Superhost
<?php

/*
 * Copyright (C) 2007 megablue (evertchin@gmail.com, http://megablue.blogspot.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
include "init.php";
$marshall_list = new index(WORKING_PATH . 'data/marshalls.txt');
if ($marshall_list->search('opacity')) {
    echo "found\n";
}
コード例 #2
0
ファイル: noSQLite.php プロジェクト: macinnir/php-noSQLite
 public function search($data, $return = false)
 {
     $indexString = $this->indexString($data, $this->meta->indexes);
     if (strlen($indexString) <= 0) {
         return false;
     }
     if ($rowNum = index::search($this->table, $indexString)) {
         return $return ? $this->read($rowNum) : $rowNum;
     }
     return false;
 }