Home  >  Article  >  Backend Development  >  smarty 在include file 包孕动态内容的时候报错(http 500)

smarty 在include file 包孕动态内容的时候报错(http 500)

WBOY
WBOYOriginal
2016-06-13 10:46:45866browse

smarty 在include file 包含动态内容的时候报错(http 500)
直接打开www.test.com/menu/index可以得到列表内容

在smarty做的时候:
首页index.php包含_head.php,_head.php包含上面那段话,访问:www.test.com/index 就不行了;

当然把_head.php中直接替换为www.test.com/menu/index得到的内容也是正确的!


请问,应该如何修改呢?


------解决方案--------------------
报什么错了
------解决方案--------------------
smarty只是模板技术,被模板引擎解释后就是html+php的混编文件,所以简单说,你的$baseurl在被引擎解释后会个url,而在php中,如果动态使用url的话需要开启allowed_url的功能(名字我记不清)
------解决方案--------------------
只用zencart的路过,不会smarty

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