Smarty reports an error (http500) when checking the dynamic package content of includefile)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.