The examples in this article describe the Config_load usage of smarty built-in functions. Share to everyone for your reference. Specifically as follows:
{Config_load} is used to load a configuration variable from a configuration file. Detailed usage is as follows:
Configuration file: foo.conf
Description: [Table] and [Customer] represent the paragraph name.
Copy Code code as follows:
[Table]
PageTitle = "This Is Mine"
Bodybgcolor = "#eee"
Tablebordersize = 3
Tablebgcolor = "#bbb"
Rowbgcolor = "#ccc"
[Customer]
PageTitle = "Customer Info"
Template file: temp.htm
Copy Code code as follows:
{config_load file= "foo.conf"}
{#pageTitle #}
{#bodyBgColor #}
The first method of introduction: Error. If each paragraph in the configuration file has a name, you must add section= "paragraph name" before you can load it into a variable.
Copy Code code as follows:
{config_load file= "foo.conf" section= "Customer"}
{#pageTitle #}
{config_load file= "foo.conf" section= "Table"}
{#pageTitle #}
The second method of loading is correct. Load the appropriate paragraph and introduce the corresponding variable.
I hope this article will help you with your PHP program design.