當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ParseFilter::clear_url方法代碼示例

本文整理匯總了PHP中ParseFilter::clear_url方法的典型用法代碼示例。如果您正苦於以下問題:PHP ParseFilter::clear_url方法的具體用法?PHP ParseFilter::clear_url怎麽用?PHP ParseFilter::clear_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ParseFilter的用法示例。


在下文中一共展示了ParseFilter::clear_url方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: build_thumb

 protected function build_thumb($gurl = "", $url = "", $align = "")
 {
     $this->_init_parse();
     $url = trim($url);
     $gurl = trim($gurl);
     $option = explode("|", trim($align));
     $align = $option[0];
     if ($align != "left" and $align != "right") {
         $align = '';
     }
     $url = $this->_parse->clear_url(urldecode($url));
     $gurl = $this->_parse->clear_url(urldecode($gurl));
     if ($gurl == "" or $url == "") {
         return;
     }
     if ($align != '') {
         return "[{$align}][url=\"{$gurl}\"][img]{$url}[/img][/url][/{$align}]";
     } else {
         return "[url=\"{$gurl}\"][img]{$url}[/img][/url]";
     }
 }
開發者ID:dautushenka,項目名稱:dle-vb,代碼行數:21,代碼來源:dle_vs_vb.php

示例2: values

    if ($db->num_rows()) {
        echo $lang['error_complaint_1'];
        die;
    }
    $text = $db->safesql($text);
    $db->query("INSERT INTO " . PREFIX . "_complaint (`p_id`, `c_id`, `n_id`, `text`, `from`, `to`, `date`) values ('0', '0', '{$row['id']}', '{$text}', '{$member_id['name']}', '', '{$_TIME}')");
    if ($config['allow_complaint_mail']) {
        $mail->send($config['admin_mail'], $lang['mail_complaint'], $lang['mail_complaint_1']);
    }
} elseif ($_POST['action'] == "orfo") {
    if (!$text) {
        die("error");
    }
    $seltext = convert_unicode($_POST['seltext'], $config['charset']);
    $seltext = htmlspecialchars($parse->process(trim($seltext)), ENT_QUOTES, $config['charset']);
    $url = $db->safesql(htmlspecialchars($parse->clear_url(trim($_POST['url'])), ENT_QUOTES, $config['charset']));
    if (!$seltext) {
        die("error");
    }
    if (!$is_logged) {
        $author = $_IP;
    } else {
        $author = $db->safesql($member_id['name']);
    }
    $row = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_complaint WHERE p_id='0' AND c_id='0' AND n_id='0' AND `from`='{$author}'");
    if ($row['count'] > 2) {
        echo $lang['error_complaint_1'];
        die;
    }
    $seltext = "<div class=\"quote\">" . stripslashes($seltext) . "</div>";
    $text = $db->safesql($seltext . $text);
開發者ID:Gordondalos,項目名稱:union,代碼行數:31,代碼來源:complaint.php


注:本文中的ParseFilter::clear_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。