本文整理匯總了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">»¼Õß: <?=$doctorComment->displayNameByMask()?> </p>
<p class="gray3">¼²²¡:
<?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 } ?>