本文整理汇总了PHP中Backend::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::search方法的具体用法?PHP Backend::search怎么用?PHP Backend::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend
的用法示例。
在下文中一共展示了Backend::search方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_encode
<?php
require_once 'backend.php';
$backend = new Backend();
$backend->connect('config.ini');
if (!$backend->auth($_POST['username'], $_POST['password'])) {
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
header('Status: 403 Forbidden');
exit;
}
header('Content-Type: application/json');
echo json_encode($backend->search($_GET['query'], $_GET['limit'], $_GET['offset'], 5)) . "\n";
示例2: dirname
?>
" maxlength="40"/> </td>
</tr>
<tr>
<td> </td>
<td><input class="submit" type="submit" value="Submit"/></td>
</tr>
</table>
</form>
<?php
define('REAL_BASE', str_replace('\\', '/', dirname(__FILE__)) . '/');
include "inc/Backend.php";
if ($_POST['inifile']) {
$GLOBALS['wwwoutput'] = TRUE;
$back = new Backend(false, $_POST['inifile']);
$back->search($HTTP_POST_VARS);
print "<pre>";
print_r($ldifString);
print "</pre>";
} else {
?>
<?php
}
#phpinfo();
?>
</div>
</body>
</html>
示例3: dirname
* @package backend
*
*/
// ini file to use
$ini = "default.ini";
define('REAL_BASE', str_replace('\\', '/', dirname(__FILE__)) . '/');
include "inc/Backend.php";
# create the logfile handle
$loghandle = fopen(REAL_BASE . 'log/shellback.log', 'a') or die("Can not open Logfile!\n");
$GLOBALS['loghandle'] = $loghandle;
fwrite($loghandle, "STARTING\n");
# parse stdin to an array and write it to the logfile
$request = array();
do {
$line = trim(fgets(STDIN));
# old school log
fwrite($loghandle, "{$line}\n");
if ($line != "") {
$tmpa = split(": ", $line);
$request[$tmpa[0]] = $tmpa[1];
fwrite($loghandle, $request[$tmpa[0]] . "\n");
}
} while ($line != "");
$back = new Backend(false, $ini);
$ldif = $back->search($request);
fwrite($loghandle, $ldif);
echo $ldif;
#echo "dn: dc=ttt,ou=ldap2sparql,dc=localdomain\n".
# "dc: ttt\n".
# "objectClass: domain\n\n";
fclose($loghandle);