Smarty Plug-in
Good morning everyone, huh?
I recently see the smarty template in the custom plug-in when a problem
Plug-in functions
function.a.php
function Smarty_function_a ($dat, $smarty) {
I would like to ask is here how to introduce my database class db.class.php class in the root directory under Include
At the same time, the introduction of conn.php,config.php in the database class is in the same directory
At the same time conn.php introduced config.php
}
?>
Reply to discussion (solution)
Different versions, different practices
But the file name should be the same as the function name, which is the same
Good morning everyone, huh?
I recently see the smarty template in the custom plug-in when a problem
Plug-in functions
function.a.php
function Smarty_function_a ($dat, $smarty) {
I would like to ask is here how to introduce my database class db.class.php class in the root directory under Include
At the same time, the introduction of conn.php,config.php in the database class is in the same directory
At the same time conn.php introduced config.php
}
?>
There's no need to introduce db.class.php.
Did you use the plugin again when you were using it on his basis?
So all you have to do in your function is the global $db, so you can use the functions in them by referencing the objects he has instantiated.