First, change the default controller index code, file location: Www\application\home\controller
Source:
<?phpnamespace home\controller;use Think\controller;class Indexcontroller extends Controller {public function Index () { $this->show (' <style type= "text/css" >*{padding:0; margin:0;} div{padding:4px 48px;} body{backg Round: #fff; Font-family: "Microsoft Jas Black"; Color: #333; font-size:24px} h1{font-size:100px; font-weight:normal; margin-bottom:12px;} p{line-height:1.8em; font- SIZE:36PX} A,a:hover{color:blue;} </style><div style= "padding:24px 48px;" >
Change the code (to show the home page):
<?php/*user:shenlintime:2017-12-24purpose: Member System home */namespace Home\controller;use Think\controller;class Indexcontroller extends Controller {public function index () { //Output page $this->display ();} }
Second, display page,
Page Save location: \application\home\view\index,view directory without the Index folder, you need to create a new folder name, naming rules need to be the same name as the controller.
Third, write the first page code
<! DOCTYPE html>
Four, view home
Develop member management systems with Thinkphp3.2-add pages