本文整理汇总了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 } ?>