首页
开发手册
应用中心
工具
用户中心
Ease Template Quick Start for Beginners
English
中文简体
English
上一篇
下一篇
### Ease Template Quick Start for Beginners The author's advice to all users: Don't be stingy to try before you start coding, don't be afraid of contact failure, these efforts will be rewarded for you as the project develops. Closer to home, let’s enter the first stage of Ease Template learning: How to apply Ease Template (hereinafter referred to as ET) If you are using it for the first time, please read it carefully. The configuration settings for the template are added here, and old users can skip it. ```php set_tpl('home'); //print template $tpl->p(); ?> ``` **Configuration Explanation:** ***ID***
*Cacheid*
When your website has multiple styles, in the cache mode, you need to correspond to the style id, black 1, purple 2, green 3, so that the cache file will automatically correspond to its own id, and there will be no interface color confusion. ***TplType***
*Template Format*
Everyone has different development habits. When they are used to smarty or phplib, they will be used to using suffix templates like index.tpl, and the default format of ET is htm ***CacheDir***
*Cache directory (compilation engine)*
ET defaults to the cache directory under the program directory. If the directory does not have write permissions, it will automatically be converted to the replacement engine, and program errors will not be caused due to permissions issues. ***TemplateDir***
*View Directory*
ET defaults to the template directory under the current program directory. ***AutoImage***
*Automatically Parse Pictures*
1 means open and 0 means closed. When there are images in the template, it will be replaced automatically. For example, in default.htm
ET will automatically resolve the address of the image to:
*语言包目录* ET will automatically collect languages into this directory to create language packs. ***Language***
*Default Language*
,Since users need individual settings, the default file can be set to cn, the generated file is cn.php, and the default is default.php ***Copyright***
*Copyright Protection Switch*
1 means open 0 means closed, it only takes effect when the development environment is in compilation mode. When the program is completely executed, the copyrighted code is generated. It can be executed without a template directory. Open source copyright protection can be realized as long as the template is not provided. ***MemCache***
*Memcache settings*
When you have a Memcache server, enter the server address for example (for example: 127.0.0.1:11211) to start an efficient and fast Memcache engine ***Compress***
*Compressed Code*
1 means open 0 means closed, automatically compress the content code output to the browser page, remove line breaks and extra spaces to reduce network traffic. ***HtmDir***
*Static Address*
Output directory of static website. ***Rewrite***
*Rewrite Address*
1 means open 0 means closed. After opening, the static connection corresponding to the cache will be staticized or the address will be staticized automatically.