模板布局:全局配置方式

模板布局:全局配置方式

D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\News\Conf\config.php

<?php
return array(
//'TMPL_TEMPLATE_SUFFIX'=>'.tpl',
//'TMPL_FILE_DEPR'=>'_',
'LAYOUT_ON'=>true,
//'LAYOUT_NAME'=>'layout',
'LAYOUT_NAME'=>'Layout/layoutname',
'URL_ROUTER_ON' => true,
'URL_MAP_RULES'=>array(
'new/top' => 'Archive/index?type=top'
)
);

D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\News\View\User\add.html

<body>
http://localhost/thinkphp323/index.php/News/User/add
</body>

D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\News\View\layout.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\News\View\layout.html</title>
</head>
{__CONTENT__}
</html>

D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\News\View\Layout\layoutname.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\News\View\Layout\layoutname.html</title>
</head>
{__CONTENT__}
</html>

 

posted @ 2017-12-05 10:03  sky20080101  阅读(124)  评论(0)    收藏  举报