How to use the conf configuration file in the smarty Template

Source: Internet
Author: User
Tags smarty template
Test. tpl

<{Config_load file = '../config/my. Conf'}>

<{# Title #}>

My. conf

Title = 'My website'
Bgcolor = 'bucket'

Execution error:
Fatal error: in E: \ myenv \ apache \ htdocs \ smarty \ libs \ sysplugins \ smarty_internal_config_file_compiler.php on line 139

I don't know why


Reply to discussion (solution)

Didn't you import variables in php?

This is to import data from the configuration file

The location of my. conf is incorrect, right?

The location of my. conf is incorrect, right?



This is not the case. I can't store the conf file in the same directory. I don't know if it is a smarty configuration problem.

You are ../config/my. conf
Therefore, config should be in the upper-level directory of 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.