When the smarty file contains dynamic content, an error (http500) is reported. test. commenuindex can be used to obtain the list content. When smarty is used, & lt; {includefile & quot; $ baseurlmenuindex & quot;} & gt; homepage index. php contains _ head. php, _ head. when php contains dynamic content in the include file, smarty reports an error (http 500)
Directly open www.test.com/menu/indexand you will be able to get the desired content.
When doing smarty: <{include file = "$ baseurl/menu/index"}>
Index. php on the home page contains _ head. php, and _ head. php contains the above section. access: www.test.com/index won't work;
Of course, replace <{include file = "$ baseurl/menu/index"}> In _ head. php with the internal content obtained by www.test.com/menu/index!
How can I modify it?
------ Solution --------------------
Error reported
------ Solution --------------------
Smarty is just a template technology. after being interpreted by the template engine, it is a mixed html + php file. so to put it simply, your $ baseurl will be a url after being interpreted by the engine, while in php, if you use a url dynamically, you need to enable the allowed_url function (I cannot remember the name)
------ Solution --------------------
Only passing by zencart, not smarty