帳號登入模版製作

和之前一樣,我們從提供給大家的模版檔案中,拿出login檔案來當作登入頁面

QQ截图20170622150131.png

#修改html檔案的樣式檔案路徑,和之前相同。

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><!--Head--><head>
    <meta charset="utf-8">
    <title>PHP中文网:交流群374224296</title>
    <meta name="description" content="login page">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="__PUBLIC__/style/bootstrap.css" rel="stylesheet">
    <link href="__PUBLIC__/style/font-awesome.css" rel="stylesheet">
    <!--Beyond styles-->
    <link id="beyond-link" href="__PUBLIC__/style/beyond.css" rel="stylesheet">
    <link href="__PUBLIC__/style/demo.css" rel="stylesheet">
    <link href="__PUBLIC__/style/animate.css" rel="stylesheet">
</head>
<!--Head Ends-->
<!--Body-->

<body>
    <div class="login-container animated fadeInDown">
        <form action="" method="post">
            <div class="loginbox bg-white">
                <div class="loginbox-title">登录</div>
                <div class="loginbox-textbox">
                    <input value="admin" class="form-control" placeholder="username" name="username" type="text">
                </div>
                <div class="loginbox-textbox">
                    <input class="form-control" placeholder="password" name="password" type="password">
                </div>
                <div class="loginbox-submit">
                    <input class="btn btn-primary btn-block" value="Login" type="submit">
                </div>
            </div>
                <div class="logobox">
                    <p class="text-center">PHP中文网:交流群374224296</p>
                </div>
        </form>
    </div>
    <!--Basic Scripts-->
    <script src="__PUBLIC__/style/jquery.js"></script>
    <script src="__PUBLIC__/style/bootstrap.js"></script>
    <script src="__PUBLIC__/style/jquery_002.js"></script>
    <!--Beyond Scripts-->
    <script src="__PUBLIC__/style/beyond.js"></script>




</body><!--Body Ends--></html>

建立login控制器

<?php
namespace Admin\Controller;
use Think\Controller;
class LoginController extends Controller
{
    public function index(){
        $this->display();
    }
}

登入頁面就正常顯示了。

繼續學習
||
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"><!--Head--><head> <meta charset="utf-8"> <title>PHP中文网:交流群374224296</title> <meta name="description" content="login page"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!--Basic Styles--> <link href="__PUBLIC__/style/bootstrap.css" rel="stylesheet"> <link href="__PUBLIC__/style/font-awesome.css" rel="stylesheet"> <!--Beyond styles--> <link id="beyond-link" href="__PUBLIC__/style/beyond.css" rel="stylesheet"> <link href="__PUBLIC__/style/demo.css" rel="stylesheet"> <link href="__PUBLIC__/style/animate.css" rel="stylesheet"> </head> <!--Head Ends--> <!--Body--> <body> <div class="login-container animated fadeInDown"> <form action="" method="post"> <div class="loginbox bg-white"> <div class="loginbox-title">登录</div> <div class="loginbox-textbox"> <input value="admin" class="form-control" placeholder="username" name="username" type="text"> </div> <div class="loginbox-textbox"> <input class="form-control" placeholder="password" name="password" type="password"> </div> <div class="loginbox-submit"> <input class="btn btn-primary btn-block" value="Login" type="submit"> </div> </div> <div class="logobox"> <p class="text-center">PHP中文网:交流群374224296</p> </div> </form> </div> <!--Basic Scripts--> <script src="__PUBLIC__/style/jquery.js"></script> <script src="__PUBLIC__/style/bootstrap.js"></script> <script src="__PUBLIC__/style/jquery_002.js"></script> <!--Beyond Scripts--> <script src="__PUBLIC__/style/beyond.js"></script> </body><!--Body Ends--></html>
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!