首页 > 后端开发 > php教程 > 网站右边调用就显示空白

网站右边调用就显示空白

WBOY
发布: 2016-06-06 20:45:53
原创
1284 人浏览过

用的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>
登录后复制
登录后复制
相关标签:
php
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板