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


PHP XString::htmlspecialchars_encode方法代碼示例

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


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

示例1: Chaos

<?php 
if (false == empty($doctorCommentList))
{
    $chaos = new Chaos();
    echo $chaos->getCssLink(); 

    foreach($doctorCommentList as $doctorComment)
    {
        $commonContent = strip_tags(nl2br($doctorComment->content));
        $shortContent = XString::truncate(strip_tags(nl2br($doctorComment->content)), 128);
?>
    <div class="dis_article_2 bt_e ovh clearfix" shortcontent='<?=XString::htmlspecialchars_encode($shortContent)?>' commoncontent='<?=XString::htmlspecialchars_encode($commonContent)?>' <?php if (strlen($commonContent) > 128) { ?>onclick="closeure(this);" <?php } ?>>            
            <div class="pb5 pl40 <?=$doctorComment->isCureThankLetter() ? 'hos_dis_tha' : 'hos_dis'?>">
                <p class="gray3">»¼Õß:&nbsp;&nbsp; <?=$doctorComment->displayNameByMask()?> </p>
                <p class="gray3">¼²²¡:&nbsp;&nbsp;
                    <?php if ($doctorComment->disease->isNull() == false) {
                        print $chaos->getChaosItem('<a href="' . $router->urlfor('disease/diseaseknowledge',array('key' => $doctorComment->disease->key)) . '" style="display:inline; color:#333;">' . $doctorComment->tag . '</a>', $chaos->iwords_disease, 3, '<a href="/touch/jibing/~1~.htm" style="display:inline; color:#333;">~2~</a>');
                    } else {
                        print $chaos->getChaosItem($doctorComment->tag, $chaos->iwords_disease, 3, '<a href="/touch/jibing/~1~.htm" style="display:inline; color:#333;">~2~</a>');
                    }
                    ?>
                </p>
            </div>
            <?php if (Doctor::getCommentRateStr($doctorComment->attitude) && Doctor::getCommentRateStr($doctorComment->attitude, "Service")) { ?>
            <p class="gray6 pb10 pl40">
                <?=str_replace('maroon', 'green_2', Doctor::getCommentRateStr($doctorComment->skill))?>¡¡ 
                <?=str_replace('maroon', 'green_2', Doctor::getCommentRateStr($doctorComment->attitude, "Service"))?>
            </p>
            <?php } ?>
            <p class="gray6 f15 lh140 pt5 pb5 feedback">
                <?php if (strlen($commonContent) > 128) { ?><a href="javascript:;" class="gray3"><?php } ?>
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:31,代碼來源:commentlistcontent.php


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