In the TP framework, in order to load static files for each module convenient, often do not need to follow the default way to place static files to the/app/module name/views/below, but in the top-level directory to create a new directory (such as the./tpl directory), to store static files
Setup method:
(1): defined in the import file of TP:
Define (' Tmpl_path ', './tpl/'); Defining Template Paths
(2): Manually create the./TPL directory (Note that the framework does not automatically generate the directory and needs to be set manually)
(3): Set a new directory in the TPL directory as needed
Example:/module name/Controller name/file
/public/Public File
(4): In order to facilitate the front-end introduction of files, you need to define common template constants
Note: The framework has defined common template constants, and new custom constants need to be set in the Convention of the framework
For example: tmpl_parse_string ' = = Array (
' __tmpl__ ' = __root__. ' /tpl ',
' __upload__ ' = __root__. /data/upload ",
),
Template path problem of TP framework and definition of common template constants