2010-09-09 45 views
0

這個Smarty PHP模板代碼有什麼問題?如果我在文件中單獨包含這兩個循環中的任意一個,它們就可以工作。但是如果我把它們都放在下面的文件中,只有第一個循環完成。這個Smarty php模板代碼有什麼問題?

{include file="vote_js.tpl"} 
    {section name=i loop=$posts} 
    {include file="posts_bitother.tpl"} 
    {/section} 



    {section name=j loop=$posts2} 
    {include file="posts_bitposts.tpl"} 
    {/section} 

因此,例如

{section name=j loop=$posts2} 
    {include file="posts_bitposts.tpl"} 
    {/section} 

它自己的正常工作。

爲什麼會發生這種情況,它的方式是什麼?

回答

0

解決了它,後來在我的聰明代碼中出錯