PHP世纪论坛

 找回密码
 立即注册
搜索
查看: 487|回复: 0

Tinkphp 更改页面样式

[复制链接]

12

主题

12

帖子

108

积分

版主

Rank: 7Rank: 7Rank: 7

积分
108
发表于 2016-9-23 18:34:35 | 显示全部楼层 |阅读模式
1、在视图中新建文件夹Public

新建sussess 和 error 页面

sussess代码:
<!DOCTYPE html>
<!--
Beyond Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3
Version: 1.0.0
Purchase: http://wrapbootstrap.com
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Head-->
<head>
    <meta charset="utf-8"/>
    <title>success</title>
    <meta http-equiv='Refresh' content='{$waitSecond};URL={$jumpUrl}'>
    <meta name="description" content="Error 404 - Page Not Found"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="shortcut icon" href="__PUBLIC__/img/favicon.png" type="image/x-icon">

    <!--Basic Styles-->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet"/>
    <link id="bootstrap-rtl-link" href="" rel="stylesheet"/>
    <link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="__PUBLIC__/css/weather-icons.min.css" rel="stylesheet"/>


    <!--Beyond styles-->
    <link id="beyond-link" href="__PUBLIC__/css/beyond.min.css" rel="stylesheet"/>
    <link href="__PUBLIC__/css/demo.min.css" rel="stylesheet"/>
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet"/>
    <link id="skin-link" href="" rel="stylesheet" type="text/css"/>

    <!--Skin Script: Place this script in head to load scripts for skins and rtl support-->
    <script src="__PUBLIC__/js/skins.min.js"></script>
</head>
<!--Head Ends-->
<!--Body-->
<body class="body-404">
<div class="error-header"></div>
<div class="container ">
    <section class="error-container text-center">
        <h1>success</h1>
        <div class="error-divider">
            <h2>{$message}</h2>
            <p class="description">succss</p>
        </div>
        <a href="index.html" class="return-btn"><i class="fa fa-home"></i>Admin</a>
    </section>
</div>
<!--Basic Scripts-->
<script src="__PUBLIC__/js/jquery-2.0.3.min.js"></script>
<script src="__PUBLIC__/js/bootstrap.min.js"></script>
<!--Beyond Scripts-->
<script src="__PUBLIC__/js/beyond.min.js"></script>
</body>
<!--Body Ends-->
</html>

error代码:
<!DOCTYPE html>
<!--
Beyond Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3
Version: 1.0.0
Purchase: http://wrapbootstrap.com
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Head-->
<head>
    <meta charset="utf-8" />
    <title>Error 500</title>
    <meta http-equiv='Refresh' content='{$waitSecond};URL={$jumpUrl}'>
    <meta name="description" content="Error 500" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href="__PUBLIC__/img/favicon.png" type="image/x-icon">

    <!--Basic Styles-->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" />
    <link id="bootstrap-rtl-link" href="" rel="stylesheet" />
    <link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet" />

    <!--Beyond styles-->
    <link id="beyond-link" href="__PUBLIC__/css/beyond.min.css" rel="stylesheet" />
    <link href="__PUBLIC__/css/demo.min.css" rel="stylesheet" />
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet" />
    <link id="skin-link" href="" rel="stylesheet" type="text/css" />

    <!--Skin Script: Place this script in head to load scripts for skins and rtl support-->
    <script src="__PUBLIC__/js/skins.min.js"></script>
</head>
<!--Head Ends-->
<!--Body-->
<body class="body-500">
    <div class="error-header"> </div>
    <div class="container ">
        <section class="error-container text-center">
            <h1>error</h1>
            <div class="error-divider">
                <h2>{$error}</h2>
                <p class="description"></p>   
            </div>
            <a href="index.html" class="return-btn"><i class="fa fa-home"></i>Admin</a>
        </section>
    </div>
    <!--Basic Scripts-->
    <script src="__PUBLIC__/js/jquery-2.0.3.min.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>

    <!--Beyond Scripts-->
    <script src="__PUBLIC__/js/beyond.min.js"></script>
</body>
<!--Body Ends-->
</html>

2、在配置文件中配置路径
'TMPL_ACTION_ERROR' => 'Public:error', // 默认错误跳转对应的模板文件
'TMPL_ACTION_SUCCESS' => 'Public:success', // 默认成功跳转对应的模板文件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|PHP世纪论坛 ( 豫ICP备15004666号-2 )

GMT+8, 2018-6-25 08:10

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表