When new users learn smarty, there is always an exception code

Source: Internet
Author: User
When new users learn smarty, they will always see error codes for the custom functions I made, functions in the plugins folder. function name. the function defined in php is the smarty_function _ function name ($ parameter, & amp; $ smarty) {function body}, which is referenced in the template. & lt; {function name .. when new users learn smarty, there are always error codes
The custom function that I made, the function in the plugins folder. function name. the function defined in php is the smarty_function _ function name ($ parameter, & $ smarty) {function body}, which is referenced in the template <{function name...}> why are I always prompted for a bunch of unintelligible errors?
Fatal error: Smarty error: [in php3.tpl line 1]: syntax error: unrecognized tag 'haibincn' (Smarty_Compiler.class.php, line 590) in D: \ myev \ apache \ htdocs \ smarty \ libs \ Smarty. class. php on line 1095

The labels defined by haibincn can all be registered through


In addition, please give me some advice. my smarty is always wrong for the first time.
Warning: strftime () [function. strftime]: It is not safe to rely on the system's timezone settings. you are * required * to use the date. timezone setting or the date_default_timezone_set () function. in case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. we selected 'utc' for '8. 0/no DST 'Instead in D: \ myev \ apache \ htdocs \ smarty \ libs \ Smarty_Compiler.class.php on line 400
After you press F5 to refresh, the above error code will not appear, but after you change the template, the double will appear !!!

Thank you for your advice.

------ Solution --------------------
When using the time function, if the time zone is not set, write date_default_timezone_set ('utc') in front of the file ');
It is best to write it into a public file

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.