当前位置: 首页>>代码示例>>PHP>>正文


PHP Sanitize::process方法代码示例

本文整理汇总了PHP中Sanitize::process方法的典型用法代码示例。如果您正苦于以下问题:PHP Sanitize::process方法的具体用法?PHP Sanitize::process怎么用?PHP Sanitize::process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sanitize的用法示例。


在下文中一共展示了Sanitize::process方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: BBCode

//Text plastic surgery (rorororor)
$email = $sanitize->CleanStr($email, 0);
//Don't allow moderators to fuck with this
$email = preg_replace("[\r\n]", "", $email);
$sub = $sanitize->CleanStr($sub, 0);
//Or this
$sub = preg_replace("[\r\n]", "", $sub);
$url = $sanitize->CleanStr($url, 0);
//Or this
$url = preg_replace("[\r\n]", "", $url);
$resto = $sanitize->CleanStr($resto, 0);
//Or this
$resto = preg_replace("[\r\n]", "", $resto);
$com = $sanitize->CleanStr($com, $moderator);
//But they can with this.
$clean = $sanitize->process($name, $com, $sub, $email, $resto, $url, $dest, $moderator);
if (USE_BBCODE === true) {
    require_once CORE_DIR . '/general/text_process/bbcode.php';
    $bbcode = new BBCode();
    $clean['com'] = $bbcode->format($clean['com']);
}
if (SPOILERS && $spoiler) {
    $clean['sub'] = "SPOILER<>" . $clean['sub'];
}
if ($moderator && isset($_POST['showCap'])) {
    if ($moderator == 1) {
        $clean['name'] = '<span class="cap moderator" >' . $clean['name'] . ' ## Mod </span> <img src="http://3chan.ml/static/mod-icon.png" alt="Mod Icon" title="This user is a 3chan Modorator." style="margin-bottom: -3px;"/> ';
    }
    if ($moderator == 2) {
        $clean['name'] = '<span class="cap admin" >' . $clean['name'] . ' ## Admin </span> <img src="http://3chan.ml/static/admin-icon.png" alt="Admin Icon" title="This user is a 3chan Administrator." style="margin-bottom: -3px;"/>';
    }
开发者ID:Bossgod,项目名称:3ch,代码行数:31,代码来源:regist.php


注:本文中的Sanitize::process方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。