log in page
New application/index/controller/Login.php
Write code:
<?php
namespace app\index\controller;
use think\View;
use think\Controller;
class login extends Controller{
public function index(){
$view = new View();
return $view->fetch('index');
}
}Point to index, create new application /index/view/login/index.html file, write the code as follows:
<!DOCTYPE>
<html>
<head>
<title>登录</title>
</head>
<style>
dl{
text-align:center;
border:2px solid #00CC99;
margin-top:100px;
margin-bottom:100px;
margin-right:400px;
margin-left:400px;
}
</style>
<body>
<div id="login_form">
<form action="/public/index.php/index/login/login" method="post">
<dl>
<dt>
<p>用户名:<input type="text" name="user_name"></p>
</dt>
<dt>
<p>密码:<input type="password" name="user_passwd"></p>
</dt>
<dt>
</dt>
<dt>
<p><input type="submit" value="登录"></p>
</dt>
</dl>
</form>
</div>
</body>
</html>Enter http://localhost/public in the browser /index.php/index/login/index,
The running results are as follows:

new file
<?php
echo "登录页面展示";
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















