What should smarty do if it reports an error (http500) when includefile contains dynamic content?

Source: Internet
Author: User
When the smarty file contains dynamic content, an error is reported (http500). The edited phper2000 at 2012-06-1513: 31: 05 directly opens www. test. commenuindex can be used to obtain the list content. When smarty is used, & lt; {include & nbsp; file $ baseurlmenu smarty reports an error when include file contains dynamic content (http 500)

This post was last edited by phper2000 at 13:31:05

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.