If the Smarty template is resolved with the same name (path different), the resulting compiled file is overwritten by the problem.
If the Smarty template is resolved with the same name (path different), the resulting compiled file is overwritten by the problem.
For example
File 1
$obj _tpl is the Smarty object
$obj _tpl->settemplateroot (dirname (__file__));
$obj _tpl->display ("Index.tpl");
File 2
$obj _tpl is the Smarty object
$obj _tpl->settemplateroot (dirname (__file__));
$obj _tpl->display ("Index.tpl");
File 1 and file 2 are not in the same path. The contents of the 2 INDEX.TPL files are also different.
After running, compile the file to
/template_c/%%117/%%1172603085
Causes the file 1 and file 2 to be opened with a browser and apply the same index.tpl.
I want to implement the INDEX.TPL that automatically apply my own path respectively. How does this work? Smarty PHP
Share to:
------Solution--------------------
Give your directory structure
------Solution--------------------
Where's the smarty? How to configure and invoke?
------Solution--------------------
To observe how to solve this problem