本文整理汇总了PHP中F3::scrub方法的典型用法代码示例。如果您正苦于以下问题:PHP F3::scrub方法的具体用法?PHP F3::scrub怎么用?PHP F3::scrub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类F3
的用法示例。
在下文中一共展示了F3::scrub方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_venue_data_from_POST
function set_venue_data_from_POST()
{
F3::set('name', F3::scrub($_POST['name']));
F3::set('address', F3::scrub($_POST['address']));
F3::set('postcode', F3::scrub($_POST['postcode']));
F3::set('info', F3::scrub($_POST['info']));
}
示例2: get
public function get()
{
if ($this->flag['search']) {
if (isset($_GET['q']) && $_GET['q'] != '') {
// Fetch Search Query
$query = F3::scrub($_GET['q']);
$search = new SearchModel();
// Fetch Search Results
if ($this->results = $search->items($query)) {
// Reroute if one match
if (count($this->results) == 1 && $this->redirect) {
F3::reroute('/loot/' . $this->results[0]['urlname']);
}
$this->title = "Search: \"" . $query . "\" - Diablo 2 Database";
$this->heading = "Search: \"" . $query . "\"";
F3::set('NOTIFY.success', "Rejoice! " . count($this->results) . " matches found!");
$this->render('search.php');
} else {
$this->heading = "Search: \"" . $query . "\"";
F3::set('NOTIFY.warning', "Nothing found in the database. Try the <a href=/loot/>Loot Directory</a>.");
$this->render('blank.php');
}
} else {
F3::reroute('/');
}
} else {
F3::set('NOTIFY.warning', "Search is temporarily disabled. Please try again later.");
$this->render('blank.php');
}
}