码迷,mamicode.com
首页 > Web开发 > 详细

thinkphp---定义前台视图模板

时间:2018-05-19 22:30:58      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:fine   路径   http   很多   dep   array   man   span   nbsp   

具体可以参考:

http://document.thinkphp.cn/manual_3_2.html#template_define

方法一:在入口文件中定义

// 定义模板路径
define("TMPL_PATH","./Templates/");

这样生成模板路径是这样的:

../Application/Home/View/Sanqi/change.html

很多时候我们可以通过模块来进行定义:例如配置: Home / Conf / config.php

<?php
return array(
    //‘配置项‘=>‘配置值‘、
    ‘VIEW_PATH‘=>‘./Home/‘,
    ‘TMPL_FILE_DEPR‘=>‘_‘
);

模板路径就是这样的:

./Home/Sanqi_change.html

达到我们的要求

 

thinkphp---定义前台视图模板

标签:fine   路径   http   很多   dep   array   man   span   nbsp   

原文地址:https://www.cnblogs.com/e0yu/p/9061735.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!