Home >Backend Development >PHP Tutorial >THINKPHP 多次include失效的问题

THINKPHP 多次include失效的问题

WBOY
WBOYOriginal
2016-06-23 13:27:131002browse

 我的模版里面有volist循环,循环里面用switch来判断包含那个文件。类似如下:

<volist name="task_list" id="v">            <switch name="v.task_code">                <case value="0|11"><include file="Partner@Task/default" /></case>                <case value="2"><include file="Partner@Task/fabric" /></case>                <case value="3"><include file="Partner@Task/accessory" /></case>                <case value="4"><include file="Partner@Task/process" /></case>                <case value="8"><include file="Partner@Task/cost2" /></case>                <case value="9"><include file="Partner@Task/fabric_handle" /></case>                <case value="10"><include file="Partner@Task/garment" /></case>                <case value="12"><include file="Partner@Task/cut_pieces" /></case>                <case value="13"><include file="Partner@Task/shop_pro" /></case>                <case value="14"><include file="Partner@Task/up_pro" /></case>                <case value="15"><include file="Partner@Task/quality" /></case>                <default /><include file="Partner@Task/default" />            </switch>          </volist>

现在有这样的问题, 包含文件多了之后,模版解析不了,直接显示空页面。
然后本地测试通过,测试环境也通过,生产环境不行。
测试环境的php版本:5.3.17
生产环境的PHP版本:5.3.3


回复讨论(解决方案)

开启apache日志看下

开启apache日志看下


似乎apache没报错。

case太多就会造成这种原因,,我减少了到9个case就可以了。

妈蛋,写了一段奇怪的语法解决了这个问题;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn