本文整理汇总了PHP中control::search方法的典型用法代码示例。如果您正苦于以下问题:PHP control::search方法的具体用法?PHP control::search怎么用?PHP control::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类control
的用法示例。
在下文中一共展示了control::search方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: control
<?php
include "../control.php";
$co = new control();
$search = isset($_POST['input']) ? $co->search($_POST['input']) : "403";
$mass = $search !== false ? str_replace(":<!#:#!>:", "<br/>Base:", $search) : $co->fromOther($_POST['input']);
echo $mass;
示例2: control
<?php
include "../control.php";
$co = new control();
$commend = $_GET['commend'];
$com = substr($commend, 3);
$re = array("status" => true);
if (substr($commend, 0, 3) == "-c/") {
$search = $co->search($com);
$mass = $search !== false ? $search : $co->fromOther($com);
if ($mass === "This isn't a MD5 hash.") {
$re['status'] = false;
$re['code'] = "403";
} elseif ($mass === "Not found") {
$re['status'] = false;
$re['code'] = "404";
} else {
$a = explode(":<!#:#!>:", $mass);
if (isset($a[1])) {
$re['base'] = $a[1];
}
$re['return'] = $a[0];
}
} elseif (substr($commend, 0, 3) == "-g/") {
$a = $co->newHash($com);
$re['return'] = $a;
$re['base'] = $com;
} else {
$re['status'] = false;
$re['code'] = "405";
}