本文整理汇总了PHP中Sanitize::safeword方法的典型用法代码示例。如果您正苦于以下问题:PHP Sanitize::safeword方法的具体用法?PHP Sanitize::safeword怎么用?PHP Sanitize::safeword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sanitize
的用法示例。
在下文中一共展示了Sanitize::safeword方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: time
}
}
}
}
// If there are no defaults
if (!isset($_POST['run_cycle'])) {
$_POST['run_cycle'] = 3600;
}
if (!isset($_POST['date_start'])) {
$_POST['date_start'] = time();
}
if (!isset($_POST['date_end'])) {
$_POST['date_end'] = 10;
}
// Sanitize Values
$_POST['title'] = Sanitize::safeword($_POST['title']);
$_POST['method'] = Sanitize::variable($_POST['method']);
$_POST['run_cycle'] = Sanitize::number($_POST['run_cycle'], 0);
$_POST['date_start'] = Sanitize::number($_POST['date_start'], 0);
$_POST['date_end'] = Sanitize::number($_POST['date_end'], 0);
// Sanitize Parameters
for ($a = 0; $a <= 3; $a++) {
$_POST['args'][$a] = isset($_POST['args'][$a]) ? Sanitize::text($_POST['args'][$a]) : "";
}
}
// Run Header
require SYS_PATH . "/controller/includes/admin_header.php";
// Get Navigation Entry
echo '
<h2 style="margin-top:20px;">' . ($editID ? 'Edit' : 'Create New') . ' Cron Task</h2>
示例2: isset
// Reset Values
$_POST['handle'] = "";
$_POST['display_name'] = "";
$_POST['email'] = "";
$_POST['password'] = "";
}
} else {
Database::endTransaction(false);
Alert::error("Process Error", "An error has occurred while processing this registration.", 1);
}
}
} else {
$_POST['email'] = isset($_POST['email']) ? Sanitize::email($_POST['email']) : "";
$_POST['password'] = isset($_POST['password']) ? Sanitize::safeword($_POST['password']) : "";
$_POST['handle'] = isset($_POST['handle']) ? Sanitize::variable($_POST['handle']) : "";
$_POST['display_name'] = isset($_POST['display_name']) ? Sanitize::safeword($_POST['display_name'], ' ') : "";
}
// Run Header
require SYS_PATH . "/controller/includes/admin_header.php";
// Display the Editing Form
echo '
<h3>Add a New User</h3>
<form class="uniform" action="/admin/AppAccount/Add User" method="post">' . Form::prepare("add-user-uni6") . '
<p>
<strong>Profile Handle:</strong><br />
<input type="text" name="handle" value="' . $_POST['handle'] . '" style="width:200px;" maxlength="22" />
</p>
<p>
<strong>Profile Display Name:</strong><br />