前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >php 实现简单的登录功能示例【基于thinkPHP框架】

php 实现简单的登录功能示例【基于thinkPHP框架】

作者头像
砸漏
发布2020-10-20 11:34:22
7330
发布2020-10-20 11:34:22
举报
文章被收录于专栏:恩蓝脚本

本文实例讲述了php 实现简单的登录功能。分享给大家供大家参考,具体如下:

//登录页面:

V层前端模板:

Administrator@QCEE61NZ66FEX2D /cygdrive/c/wamp/www/thinkphp/Home/Tpl/Login $ ls

index.html

代码语言:javascript
复制
<!doctype html 
<html lang="en" 
 <head 
 <meta name="Generator" content="EditPlus?" 
 <meta name="Author" content="" 
 <meta name="Keywords" content="" 
 <meta name="Description" content="" 
 <title Document</title 
 </head 
 <body 
 <!doctype html 
<html lang="en" 
 <head 
 <meta name="Generator" content="EditPlus?" 
 <meta name="Author" content="" 
 <meta name="Keywords" content="" 
 <meta name="Description" content="" 
 <title Document</title 
 </head 
 <body 
 <center 
 <h1 中均运维管理平台</h1 
  <!--图片标签-- 
<img src="__PUBLIC__/Images/scan.jpg"/ 
 </center 
 <form 
 <center 
 用户名:<input type='text' name='username'/ <br/ 
 密 码:<input type='passwords' name='password'/ <br/ 
 验证码:<input type='text' name='code'/ <br/ 
 <input type='submit'/ 
 <center/ 
<!-- <table width="600" hborder="0" cellspacing="0" cellpadding="0" 
<tr 
<td 用户名:</td 
<td <input type="text" name="username"/ </td 
<td 密码:</td 
<td <input type="password" name="password"/ </td 
<td <input type="button" name="login" value="login"/ </td 
</tr  -- 
 </form 
 </body 
</html 
 </body 
</html 

// C层类

Administrator@QCEE61NZ66FEX2D /cygdrive/c/wamp/www/thinkphp/Home/Lib/Action $ ls -ltr LoginAction.class.php

代码语言:javascript
复制
<?php
 class LoginAction extends Action {
 function index(){
  $this- display();
 }
}
? 

更多关于thinkPHP相关内容感兴趣的读者可查看本站专题:《ThinkPHP入门教程》、《thinkPHP模板操作技巧总结》、《ThinkPHP常用方法总结》、《codeigniter入门教程》、《CI(CodeIgniter)框架进阶教程》、《Zend FrameWork框架入门教程》及《PHP模板技术总结》。

希望本文所述对大家基于ThinkPHP框架的PHP程序设计有所帮助。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-09-11 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
验证码
腾讯云新一代行为验证码(Captcha),基于十道安全栅栏, 为网页、App、小程序开发者打造立体、全面的人机验证。最大程度保护注册登录、活动秒杀、点赞发帖、数据保护等各大场景下业务安全的同时,提供更精细化的用户体验。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档