Php+mysql写网页注册登录系统

1、搭建msyql+php+apache的网站环境

(1) 在云服务器上搭建服务器,推荐使用宝塔集成

(2) 在本地windows搭建,推荐自己采用分开安装,这样可以更好的配置自己的需求

2、编写前端登录注册页面

(1) 采用form表单编写登录注册页面

(2) 也可以form表单配合ajax实现表单提交

代码演示:

login_register.html

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>登录注册</title>

<link rel="stylesheet" href="css/style.css">

</head>

<body>

<!--背景-->

<div class="wel" id="background-3"></div>

<!--左右两边云-->

<div class="wel" id="box">

<div class="box-1 lefp"></div>

<div class="box-1">

<div class="righp"></div>

</div>

</div>

<!--荧光点点-->

<div class="wel" id="git"></div>

<!--登录注册表-->

<div class="wel" id="from">

<div class="box-2 le-1">

<form action="php/login.php" method="POST">

<div class="flrg">

<h3>登录</h3>

<div class="a">

<!--<label>账号:</label>-->

<input type="text" class="in-1" name="username" placeholder="请输入用户名">

</div>

<div class="a">

<!--<label>密码:</label>-->

<input type="password" class="in-1" name="password" placeholder="请输入密码">

</div>

<div class="a">

<input type="submit" name="submit" value="登录" id="login_sub">

<!-- <button type="button">登录</button> -->

</div>

<div class="a">

<div class="hr"></div>

</div>

<div class="a">

<a href="#">忘记密码?</a>

</div>

</div>

</form>

</div>

<div class="box-2 le-2">

<form action="php/register.php" method="POST">

<div class="flrg-1">

<h3>注册</h3>

<div class="a">

<input type="text" class="in-1" name="username" placeholder="您的用户名">

</div>

<div class="a">

<input type="password" class="in-1" name="password" placeholder="输入密码">

</div>

<div class="a">

<input type="password" class="in-1" name="pwd" placeholder="再次确认密码">

</div>

<div class="a">

<input type="text" class="in-1" name="phone" placeholder="输入手机号码">

</div>

<div class="a">

<input type="email" class="in-1" name="email" placeholder="输入邮箱地址">

</div>

<div class="a">

<input type="submit" name="submit" value="注册" id="register_sub">

<!-- <button type="button">注册</button> -->

</div>

</div>

</form>

</div>

</div>

</body>

</html>

Style.css:

/*鬼泣*/

.wel{

position: absolute;

left: 0;

right: 0;

top: 0;

bottom: 0;

}

#background-3{

background: url("../imgs/preview-1.jpg") no-repeat;

background-size: cover;

height: 900px;

}

.box-1{

width: 50%;

height: 900px;

float: left;

overflow: hidden;

}

.box-2{

width: 50%;

position: relative;

float: left;

overflow: hidden;

top: 25%;

}

.lefp{

background: url("../img/1baa42452320f5d4eb2f5e1f22cacebb.png");

-webkit-animation: mylefp 10s;

-o-animation: mylefp 10s;

animation: mylefp 10s;

position: relative;

float: left;

opacity: 0;

background-position: 100% 0;

}

.righp{

background: url("../img/1baa42452320f5d4eb2f5e1f22cacebb.png") ;

-webkit-animation: myrighp 10s;

-o-animation: myrighp 10s;

animation: myrighp 10s;

position: relative;

float: right;

opacity: 0;

width: 100%;

height: 100%;

overflow: hidden;

}

#git{

background: url("../img/midground.png");

-webkit-animation: mygit 100s linear infinite;

-o-animation: mygit 100s linear infinite;

animation: mygit 100s linear infinite;

}

/*左边云*/

@keyframes mylefp {

0%{

left: 0;

opacity: 1;

}

100%{

left: -60%;

opacity: 0;

}

}

@-o-keyframes mylefp {

0%{

left: 0;

opacity: 1;

}

100%{

left: -60%;

opacity: 0;

}

}

@-moz-keyframes mylefp {

0%{

left: 0;

opacity: 1;

}

100%{

left: -60%;

opacity: 0;

}

}

@-ms-keyframes mylefp {

0%{

left: 0;

opacity: 1;

}

100%{

left: -60%;

opacity: 0;

}

}

@-webkit-keyframes mylefp {

0%{

left: 0;

opacity: 1;

}

100%{

left: -60%;

opacity: 0;

}

}

/*右边云*/

@keyframes myrighp {

0%{

right: 0;

opacity: 1;

}

100%{

right: -120%;

opacity: 0;

}

}

@-webkit-keyframes myrighp {

0%{

right: 0;

opacity: 1;

}

100%{

right: -120%;

opacity: 0;

}

}

@-ms-keyframes myrighp {

0%{

right: 0;

opacity: 1;

}

100%{

right: -120%;

opacity: 0;

}

}

@-moz-keyframes myrighp {

0%{

right: 0;

opacity: 1;

}

100%{

right: -120%;

opacity: 0;

}

}

@-o-keyframes myrighp {

0%{

right: 0;

opacity: 1;

}

100%{

right: -120%;

opacity: 0;

}

}

/*荧光点点*/

@keyframes mygit {

0%{

background-position: 0 0;

/*transform: translateY(0px);*/

}

100%{

background-position: 0 -600%;

}

}

@-o-keyframes mygit {

0%{

background-position: 0 0;

/*transform: translateY(0px);*/

}

100%{

background-position: 0 -600%;

}

}

@-moz-keyframes mygit {

0%{

background-position: 0 0;

/*transform: translateY(0px);*/

}

100%{

background-position: 0 -600%;

}

}

@-ms-keyframes mygit {

0%{

background-position: 0 0;

/*transform: translateY(0px);*/

}

100%{

background-position: 0 -600%;

}

}

@-webkit-keyframes mygit {

0%{

background-position: 0 0;

/*transform: translateY(0px);*/

}

100%{

background-position: 0 -600%;

}

}

.le-1{

position: relative;

-webkit-animation: myflrg 10s;

-o-animation: myflrg 10s;

animation: myflrg 6s;

}

.le-2{

overflow: hidden;

height: 73%;

}

.flrg{

float: right;

width: 300px;

background: rgba(255,255,255,.6);

text-align: center;

padding-bottom: 40px;

-webkit-border-radius: 4px;

-moz-border-radius: 4px;

border-radius: 4px;

}

.a{

margin: auto;

}

.flrg>.a,.flrg-1>.a{

padding: 10px;

}

.flrg>.a>.in-1,.flrg-1>.a>.in-1{

outline: none;

opacity: 0.6;

width: 238px;

height: 33px;

border: none;

-webkit-border-radius: 3px;

-moz-border-radius: 3px;

border-radius: 3px;

font-size: 16px;

color: black;

padding-left: 15px;

}

.in-1:focus{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-webkit-animation: myin-1 10s linear infinite;

-o-animation: myin-1 10s linear infinite;

animation: myin-1 10s linear infinite;

}

.flrg>.a>button,.flrg-1>.a>button{

width: 91%;

padding: 10px;

border: none;

-webkit-border-radius: 10px;

-moz-border-radius: 10px;

border-radius: 10px;

cursor: pointer;

-webkit-box-shadow: 0 0 19px rgba(0, 0, 0, .1);

-moz-box-shadow: 0 0 19px rgba(0, 0, 0, .1);

box-shadow: 0 0 19px rgba(0, 0, 0, .1);

background: rgba(6,127,228,0.71);

color: white;

font-weight: bold;

letter-spacing: 12px;

text-align: center;

outline: none;

-webkit-transition: all 2s;

-moz-transition: all 2s;

-ms-transition: all 2s;

-o-transition: all 2s;

transition: all 2s;

}

.flrg>.a>button:hover,.flrg-1>.a>button:hover{

-webkit-box-shadow:0 15px 30px 0 rgba(255,255,255,.15) inset, 0 2px 7px 0 rgba(0,0,0,.2);

-moz-box-shadow:0 15px 30px 0 rgba(255,255,255,.15) inset, 0 2px 7px 0 rgba(0,0,0,.2);

box-shadow:0 15px 30px 0 rgba(255,255,255,.15) inset, 0 2px 7px 0 rgba(0,0,0,.2);

}

.hr{

width: 91%;

height: 2px;

background: rgba(255,255,255,0.6);

margin: auto;

}

.flrg>.a>a{

text-decoration: none;

font-weight: bold;

color: #545454;

}

.flrg-1{

float: left;

width: 300px;

background: rgba(255,255,255,.6);

text-align: center;

padding-bottom: 40px;

-webkit-border-radius: 4px;

-moz-border-radius: 4px;

border-radius: 4px;

position: absolute;

-webkit-animation: myflrg-2 10s;

-o-animation: myflrg-2 10s;

animation: myflrg-2 6s;

overflow: hidden;

}

/*登录*/

@keyframes myflrg {

0%{

top: -300%;

}

100%{

top: 25%;

}

}

@-webkit-keyframes myflrg {

0%{

top: -300%;

}

100%{

top: 25%;

}

}

@-ms-keyframes myflrg {

0%{

top: -300%;

}

100%{

top: 25%;

}

}

@-moz-keyframes myflrg {

0%{

top: -300%;

}

100%{

top: 25%;

}

}

@-o-keyframes myflrg {

0%{

top: -300%;

}

100%{

top: 25%;

}

}

/*注册*/

@keyframes myflrg-2 {

0%{

top: 300%;

}

100%{

top: 0;

}

}

@-o-keyframes myflrg-2 {

0%{

top: 300%;

}

100%{

top: 0;

}

}

@-moz-keyframes myflrg-2 {

0%{

top: 300%;

}

100%{

top: 0;

}

}

@-ms-keyframes myflrg-2 {

0%{

top: 300%;

}

100%{

top: 0;

}

}

@-webkit-keyframes myflrg-2 {

0%{

top: 300%;

}

100%{

top: 0;

}

}

/*input呼吸框*/

@keyframes myin-1 {

0%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

50%{

-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;

-moz-box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

}

100%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

}

@-webkit-keyframes myin-1 {

0%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

50%{

-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;

-moz-box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

}

100%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

}

@-ms-keyframes myin-1 {

0%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

50%{

-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;

-moz-box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

}

100%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

}

@-moz-keyframes myin-1 {

0%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

50%{

-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;

-moz-box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

}

100%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

}

@-o-keyframes myin-1 {

0%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

50%{

-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;

-moz-box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

box-shadow:  0 0 33px #ff1000 inset, 0 0 18px #ff0300;

}

100%{

-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;

}

}

#login_sub{

width: 91%;

padding: 10px;

border: none;

-webkit-border-radius: 10px;

-moz-border-radius: 10px;

border-radius: 10px;

cursor: pointer;

-webkit-box-shadow: 0 0 19px rgba(0, 0, 0, .1);

-moz-box-shadow: 0 0 19px rgba(0, 0, 0, .1);

box-shadow: 0 0 19px rgba(0, 0, 0, .1);

background: rgba(6,127,228,0.71);

color: white;

font-weight: bold;

letter-spacing: 12px;

text-align: center;

outline: none;

-webkit-transition: all 2s;

-moz-transition: all 2s;

-ms-transition: all 2s;

-o-transition: all 2s;

transition: all 2s;

}

#register_sub{

width: 91%;

padding: 10px;

border: none;

-webkit-border-radius: 10px;

-moz-border-radius: 10px;

border-radius: 10px;

cursor: pointer;

-webkit-box-shadow: 0 0 19px rgba(0, 0, 0, .1);

-moz-box-shadow: 0 0 19px rgba(0, 0, 0, .1);

box-shadow: 0 0 19px rgba(0, 0, 0, .1);

background: rgba(6,127,228,0.71);

color: white;

font-weight: bold;

letter-spacing: 12px;

text-align: center;

outline: none;

-webkit-transition: all 2s;

-moz-transition: all 2s;

-ms-transition: all 2s;

-o-transition: all 2s;

transition: all 2s;

}

编写注册成功返回页面return_register.html

3、数据库操作

(1) 创建数据库

(2) 创建数据表

(3) 创建字段id 、username、password、email、phone等

4、编写php后台

(1) 连接数据库;

conn.php

<?php

header("Content-Type:text/html;charset=utf8");

$mysql_server_name = "localhost:3306"; //连接数据库端口

$mysql_username = "root@"; //用户名

$mysql_password = "123456"; //密码

$mysql_database = "test"; //数据库名称

$conn = new mysqli($mysql_server_name, $mysql_username, $mysql_password, $mysql_database); //构造函数mysql

// 检测连接

if ($conn->connect_error) {

die("连接失败: " . $conn->connect_error);

}

//echo "连接成功";

(2) 编写接受注册信息的register.php

<?php

include 'conn.php';

if (isset($_POST["submit"])) {

$username = $_POST["username"];

$password = $_POST["password"]; //获取表单数据

$pwd = $_POST["pwd"];

$phone = $_POST["phone"];

$email = $_POST["email"];

if ($name == null && $password == null) { //判断是否填写

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "请填写完成!" . "\"" . ")" . ";" . "</script>";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";

} else {

if ($phone == null && $email == null) { //判断是否填写

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "请填写完成!" . "\"" . ")" . ";" . "</script>";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";

} else {

if ($password != $pwd) { //确认密码是否正确

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "密码不一致!" . "\"" . ")" . ";" . "</script>";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";

} else {

$password_sure = password_hash($password, PASSWORD_DEFAULT); //密码加密

$password = $password_sure;

$sql = $conn->query("SELECT username FROM login_register WHERE username ='{$username}'"); //查询数据库中的用户名和密码 并返回集合

$row = mysqli_fetch_assoc($sql); //取其中一行

if ($row > 0) { //判断是否存在

//判断数据库表中是否已存在该用户名

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "该用户名已被注册" . "\"" . ")" . ";" . "</script>";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";

} else {

$sql01 = $conn->query("SELECT phone FROM login_register WHERE phone ='{$phone}'"); //查询数据库中的用户名和密码 并返回集合

$row01 = mysqli_fetch_assoc($sql01); //取其中一行

if ($row01 > 0) { //判断是否存在

//判断数据库表中是否已存在该用户名

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "该手机号已被注册" . "\"" . ")" . ";" . "</script>";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";

} else {

$sql02 = $conn->query("SELECT email FROM login_register WHERE email ='{$email}'"); //查询数据库中的用户名和密码 并返回集合

$row02 = mysqli_fetch_assoc($sql02); //取其中一行

if ($row02 > 0) { //判断是否存在

//判断数据库表中是否已存在该用户名

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "该邮箱已被注册" . "\"" . ")" . ";" . "</script>";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";

} else {

//values('$username','$password1','$password2')给变量加上单引号后,使得可以写入汉字和字母

$conn->query("INSERT INTO login_register(username,password,phone,email) VALUES('$username','$password','$phone','$email')"); //将注册信息插入数据库表中          //echo"$sql";

echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../return_register.html" . "\"" . "</script>";

}

}

}

}

}

}

}

(3) 编写接受判断登录信息的login.php

<?php

session_start();

include('conn.php');

if(isset($_POST["submit"])){

$username=$_POST["username"];

$password=$_POST["password"];

if($username==null && $password==null){//判断是否为空

echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."请填写正确的信息!"."\"".")".";"."</script>";

echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../login_register.html"."\""."</script>";

exit;

}

$sql = $conn->query("select username from login_register where username ='{$username}'"); //查询数据库中的用户名和密码 并返回集合

$row = mysqli_fetch_assoc($sql); //取其中一行

$sql_password = "SELECT password FROM login_register WHERE username='{$username}'";

$rows=$conn->query($sql_password);

$data=$rows->fetch_all();

$password_sure=$data[0][0];

if ($row > 0) { //判断是否存在

if (password_verify($password,$password_sure)) {

$_SESSION['username'] = $username;//传入session数据

echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."登录成功后跳转页面"."\""."</script>";

}else{

echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."用户名或密码错误,登录失败!请您重新登录或注册"."\"".")".";"."</script>";

echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../login_register.html"."\""."</script>";

}

} else {

// echo $row;

echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."登录失败!请您重新登录或注册"."\"".")".";"."</script>";

echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../login_register.html"."\""."</script>";

}

}

php+mysql+apache实现登录注册系统的更多相关文章

  1. Django+pycharm+mysql 实现用户登录/注册(Django五)

    首先是让Django项目与mysql数据库初步建立连接 具体做法见:pycharm连接mysql(注意其中第二步MySQL驱动最好安装最新版的) 这里讲一下我在做这一步遇到的问题.一般Driver 那 ...

  2. Django项目登录注册系统

    Django项目之个人网站 关注公众号"轻松学编程"了解更多. Github地址:https://github.com/liangdongchang/MyWeb.git 感兴趣的可 ...

  3. Node.js Express连接mysql完整的登陆注册系统(windows)

    windows学习环境: node 版本: v0.10.35 express版本:4.10.0 mysql版本:5.6.21-log 第一部分:安装node .Express(win8系统 需要&qu ...

  4. JavaWeb-SpringBoot_使用MySQL管理用户登录注册+接入腾讯短信SDK_demo

    使用Gradle编译项目 传送门 项目已托管到Github上 传送门 JavaWeb-SpringBoot_一个类实现腾讯云SDK发送短信 传送门 用户注册 用户并非一定要输入正确的手机验证码去激活当 ...

  5. node+mysql+express实现登录/注册/修改密码/删除用户 接口

    实现用户的注册.登录.修改密码.删除用户操作 用到的数据库:nodecms:表:user 目录结构: db目录下存放数据库操作语句: userSQL.js 用户有关的操作语句 router目录 接口路 ...

  6. IDEA+MySQL实现登录注册的注册验证时出现 Cannot resolve query parameter '2'

    问题描述: 在IDEA+MySQL+Tomcat 实现登录注册JSP的注册信息INSERT验证时出现 Cannot resolve query parameter '2' 贴上创建链接的代码: if( ...

  7. MySQL前后台交互登录系统设计

    1.首先我们做一个前台的注册页面 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"& ...

  8. Django实现用户登录注册

    本文将会介绍小白如何完成一个用户登录注册系统 新建一个Django项目,名字为login_register,并且使用命令manage.py startapp.User(名字自己随便起) 最终djang ...

  9. Java图形界面开发—简易登录注册小程序

    登录注册小代码,将学过的一些小知识融合在一起进行了使用,加深印象.本例中如果有注释不详细的地方,详见其它博客. Java程序操作数据库SQLserver详解 功能介绍:简单的登录注册系统,使用了数据库 ...

随机推荐

  1. Docker镜像-拉取并且运行

    1.docker search : 从Docker Hub查找镜像 docker search [OPTIONS] 镜像名 OPTIONS说明: --automated :只列出 automated ...

  2. JavaScript图片预览

    预览选中的图片文件 jQuery $("#selectImage").change(function(){ $("#image").attr("src ...

  3. C#获取CPU与网卡硬盘序列号及Base64和DES加密解密操作类

    public class RegisterHelp { /// <summary> /// CPU /// </summary> /// <returns>< ...

  4. day56 js收尾,jQuery前戏

    目录 一.原生js事件绑定 1 开关灯案例 2 input框获取焦点,失去焦点案例 3 实现展示当前时间,定时功能 4 省市联动 二.jQuery入门 1 jQuery的两种导入方式 1.1 直接下载 ...

  5. vue中v-model父子组件通信

    有这样的需求,父组件绑定v-model,子组件输入更改父组件v-model绑定的数值.是怎么实现的呢? 实际上v-model 只是语法糖而已. <input v-model="inpu ...

  6. CTFHub_技能树_文件上传

    文件上传 无限制 直接上传一句话后门,使用蚁剑连接: 获得flag: 前端验证 尝试直接上传后门,发现被拦截,经过判断为Javascript前端验证: 这里可以使用Firefox浏览器插件禁用页面js ...

  7. java 面向对象(六):类结构 方法(三) java的值传递机制

    java的值传递机制 1.针对于方法内变量的赋值举例: System.out.println("***********基本数据类型:****************"); int ...

  8. 数据可视化之PowerQuery篇(八)利用PowerQuery,进行更加灵活的数据分列

    https://zhuanlan.zhihu.com/p/66540160 常规分列 我们最常见的就是有固定分隔符的规范数据,这种直接就按照分隔符拆分就可以了, 如果没有分割符怎么办?依然是上面的数据 ...

  9. bzoj3043IncDec Sequence*

    bzoj3043IncDec Sequence 题意: n个数,每次可以将区间l到r里的数+1或-1,问将它们变成同个数的最小操作次数和保证最小操作次数前提下有多少中可能.n≤100000. 题解: ...

  10. bzoj4318OSU!*

    bzoj4318OSU! 题意: 一个长度为n的序列,每个元素有一定概率是1,不是1就是0.连续x个1可以贡献x^3的分数,问期望分数. 题解: 期望dp.f1[i]表示连续到i的期望长度,f2[i] ...