>백엔드 개발 >PHP 튜토리얼 >网站右边调用就显示空白

网站右边调用就显示空白

WBOY
WBOY원래의
2016-06-06 20:45:531281검색

用的mymps程序 就是下面这段代码 只要加上 {if $announce neq ''} 类似的代码 就显示空白 网站其他地方就没事

<code><br><br><br><div class="announce_faq">
                {if $announce neq ''}
                <div class="announce">
                    <div class="hd">
                        <div class="span">网站公告</div>
                        <div class="more"><a href="%7B%24about.announce_uri%7D" target="_blank">更多</a></div>
                    </div>
                    <div class="bd">
                        <ul>
                            {foreach from=$announce item=announce name=announcer}
                            <li>
<span class="announcetitle"><a href="%7B%24announce.uri%7D" title="{$announce.title}" target="_blank"><font color="{$announce.titlecolor}">{$announce.title|truncate:26}</font></a></span><span class="announcetime">{$announce.pubdate|date_format:'%m-%d'}</span>
</li>
                            {/foreach}
                        </ul>
                    </div>
                </div>
                <div class="clear"></div>
                {/if}
                {if $faq neq ''}
                <div class="faq">
                    <div class="hd">
                        <div class="span">新手帮助</div>
                        <div class="more"><a href="%7B%24about.faq_uri%7D" target="_blank">更多</a></div>
                    </div>
                    <div class="bd">
                        <ul>
                            {foreach from=$faq item=faq}
                            <li><a href="%7B%24faq.uri%7D" target="_blank">{$faq.title|truncate:'30'}</a></li>
                            {/foreach}
                        </ul>
                    </div>
                </div>
                {/if}
            </div>


        

</code>

回复内容:

用的mymps程序 就是下面这段代码 只要加上 {if $announce neq ''} 类似的代码 就显示空白 网站其他地方就没事

<code><br><br><br><div class="announce_faq">
                {if $announce neq ''}
                <div class="announce">
                    <div class="hd">
                        <div class="span">网站公告</div>
                        <div class="more"><a href="%7B%24about.announce_uri%7D" target="_blank">更多</a></div>
                    </div>
                    <div class="bd">
                        <ul>
                            {foreach from=$announce item=announce name=announcer}
                            <li>
<span class="announcetitle"><a href="%7B%24announce.uri%7D" title="{$announce.title}" target="_blank"><font color="{$announce.titlecolor}">{$announce.title|truncate:26}</font></a></span><span class="announcetime">{$announce.pubdate|date_format:'%m-%d'}</span>
</li>
                            {/foreach}
                        </ul>
                    </div>
                </div>
                <div class="clear"></div>
                {/if}
                {if $faq neq ''}
                <div class="faq">
                    <div class="hd">
                        <div class="span">新手帮助</div>
                        <div class="more"><a href="%7B%24about.faq_uri%7D" target="_blank">更多</a></div>
                    </div>
                    <div class="bd">
                        <ul>
                            {foreach from=$faq item=faq}
                            <li><a href="%7B%24faq.uri%7D" target="_blank">{$faq.title|truncate:'30'}</a></li>
                            {/foreach}
                        </ul>
                    </div>
                </div>
                {/if}
            </div>


        

</code>
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.