1. 程式人生 > >一個簡單的註冊登入頁面(包括阿里大於的手機驗證)html+JS+AJAX+PHP

一個簡單的註冊登入頁面(包括阿里大於的手機驗證)html+JS+AJAX+PHP

        背景:非計算機專業,在校學習期間,接觸過linux,perl,C語言。今年畢業以後學了一段時間的html/css/javascript,最近找到一份PHP程式設計師工作。面試的時候,HR讓我回去做個註冊登入頁面,花了三天時間做了個簡單的註冊登入頁。現在把程式碼貼上。

        首先,是註冊頁面。註冊要考慮幾個方面的內容,第一:輸入內容的合法性,可通過javascript實現;第二:檢驗輸入內容(如使用者名稱、手機號等)是否在資料庫中已存在(AJAX+PHP)。第三:儲存(AJAX+PHP)。

       其中,阿里大於的手機簡訊驗證,需要下載它的SDK包。手機驗證的邏輯是:PHP生成驗證碼並存入session中,並通過簡訊介面(阿里大於)給使用者傳送此次的驗證碼,通過AJAX把使用者輸入值傳參到後臺PHP,並在後臺PHP檔案中對比使用者傳入的驗證碼是否與session中的驗證碼匹配。

       其次,是登入介面。登入介面主要是驗證內容是否與資料庫中內容完全匹配。

       最後,待續……忘記密碼的介面及功能實現。

一、註冊介面成圖如下:


Code1:  register.html    

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html">
<meta charset="utf-16">
<meta name="keywords" content="keyword1,keword2,keyword3">
<meta name="description" content="你網頁的描述">
<meta name="author" content="" >
<meta name="copyright" content="">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>I am a register</title>
<link rel="stylesheet" type="text/css" href="register.css">
<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
<style type="text/css">

</style>  
<script>
   //單擊輸入文字框時,出現的information
  function userNameInfo(){
  var s=document.getElementById("loginname_next_td");
  s.innerHTML="<font style='color:grey;'>支援數字、字母、下劃線,4-15個字元</font>";
  }

  function passwordInfo(){
  var s=document.getElementById("password_next_td");
  s.innerHTML="<font style='color:grey;'>建議使用字母、數字和符號兩種及以上組合,8-15個字元</font>";
  }

  function passwordConfirmInfo(){
  var s=document.getElementById("password2_next_td");
  s.innerHTML="<font style='color:grey;'>請再次輸入密碼</font>";
  }
  
  function phoneInfo(){
  var s=document.getElementById("phone_next_td");
  s.innerHTML="<font style='color:grey;'>完成驗證後,可以使用該手機登入和找回密碼</font>";
  }
 
  function emailInfo(){
  var s=document.getElementById("email_next_td");
  s.innerHTML="<font style='color:grey;'>請輸入郵箱地址</font>";
  }
  //登入名驗證
  function checkUserName(){
  var userName=document.getElementById("loginname").value;
  var s=document.getElementById("loginname_next_td");
  //通過AJAX與後臺通訊,判斷使用者名稱是否已存在於資料庫。
  function validate(){
    $.ajax({
      url:"checkUserName.php",
      data:{"username":userName},//傳入後臺引數
      type:"POST",
      success:function(data){
       console.log(data);
       var dataObj=JSON.parse(data);//對字串形式的json解析為物件
       console.log(dataObj.result);
       if(dataObj.result=="validate!"){s.innerHTML="<img src='./pic/checkbox-checked.png' width='20px' height='20px'>";}
       else{s.innerHTML="使用者名稱已存在";document.getElementById("loginname").value="";}    
     }
    });
  }

  var Reg=/^[0-9a-zA-Z_]{4,15}$/;//用正則判斷其合法性
  if(Reg.test(userName)){
  validate();}
  else{s.innerHTML="數字、字母、下劃線組合,4-15個字元";document.getElementById("loginname").value="";}
}

function checkPassword(){
var password=document.getElementById("password1").value;
var s=document.getElementById("password1_next_td");
var Reg=/^[a-zA-Z0-9\$\(\)\*\+\[\]\?\\\^\{\}\|]{8,15}$/;
if(Reg.test(password)){
s.innerHTML="<img src='./pic/checkbox-checked.png' width='20px' height='20px'>";
}
else{s.innerHTML="8-15個字元";document.getElementById("password1").value="";}
}

function checkPasswordConfirm(){
var password=document.getElementById("password1").value;
var passwordConfirm=document.getElementById("password2").value;
var s=document.getElementById("password2_next_td");
if(password==""){s.innerHTML="請先輸入密碼";}
else{
  if(passwordConfirm==password){
  s.innerHTML="<img src='./pic/checkbox-checked.png' width='20px' height='20px'>";}
  else{s.innerHTML="兩次輸入的密碼不一致";}
 }
}


function checkPhone(){
var phone=document.getElementById("phone").value;
var s=document.getElementById("phone_next_td");

function validate(){
    $.ajax({
      url:"checkPhone.php",
      data:{"phone":phone},//傳入後臺引數
      type:"POST",
      success:function(data){
       console.log(data);
       var dataObj=JSON.parse(data);//對字串形式的json解析為物件
       console.log(dataObj.result);
       if(dataObj.result=="validate!"){s.innerHTML="<img src='./pic/checkbox-checked.png' width='20px' height='20px'>";}
       else{s.innerHTML="該手機號已被註冊";document.getElementById("loginname").value="";}
     }
    });
  } 

var Reg=/^1\d{10}$/;//以1打頭,11位
if(Reg.test(phone)){validate();}
else{s.innerHTML="請輸入正確的電話號碼";document.getElementById("phone").value="";}
}



  function phoneVertificationCodeSend(){
  //後臺生成隨機數,並存入session,提取手機號作為輸入引數傳給.php,.php利用簡訊介面通過阿里大魚傳送給使用者驗證碼
  //根據使用者輸入,進入後端,判斷使用者輸入和之前的驗證碼是否一致,一致的話輸出校驗成功。
  //ps:有時間可以設定驗證碼間隔幾次可點選重新發送,並回收.php的反饋,並顯示是否成功傳送
    s=document.getElementById("vertificationCode_next_td");
    var phone=document.getElementById("phone").value;
    var userName=document.getElementById("loginname").value;
    function vertiCodeSend(){
      $.ajax({
      url:"phoneVertificationCodeSend.php",
      data:{"username":userName,"phone":phone},//傳入後臺引數
      type:"POST",
      success:function(data){
       console.log(data);
      // var dataObj=JSON.parse(data);//對字串形式的json解析為物件
       //console.log(dataObj.result);
       //if(dataObj.result1=="send!"){alert("驗證碼傳送成功");}
       //else{alert("驗證碼傳送失敗");}
       }
      });
    }
  if((phone=="")||(userName=="")){s.innerHTML="請先輸入使用者名稱及手機號";}
  else{vertiCodeSend();s.innerHTML="";}
  }

   function checkPhoneVertificationCode(){
   var inputVertiCode=document.getElementById("vertificationCode").value;
   var s=document.getElementById("vertificationCode_next_td");
   $.ajax({
      url:"checkPhoneVertificationCode.php",
      data:{"inputVertiCode":inputVertiCode},//傳入後臺引數
      type:"POST",
      success:function(data){
       console.log(data);
       var dataObj=JSON.parse(data);//對字串形式的json解析為物件
      console.log(dataObj.result);
      if(dataObj.result=="validate!"){s.innerHTML="<img src='./pic/checkbox-checked.png' width='20px' height='20px'>";}
      else{s.innerHTML="校驗失敗";}
       }
      });
   }

function checkEmail(){
var email=document.getElementById("email").value;
var s=document.getElementById("email_next_td");
function validate(){
    $.ajax({
      url:"checkEmail.php",
      data:{"email":email},//傳入後臺引數
      type:"POST",
      success:function(data){
       console.log(data);
       var dataObj=JSON.parse(data);//對字串形式的json解析為物件
       console.log(dataObj.result);
       if(dataObj.result=="validate!"){s.innerHTML="<img src='./pic/checkbox-checked.png' width='20px' height='20px'>";}
       else{s.innerHTML="該郵箱已被註冊";document.getElementById("email").value="";}
     }
    });
  }

var Reg=/^(\w)
[email protected]
([0-9a-zA-z])+(\.[0-9a-zA-Z]{2,})+$/;//字母數字下劃線打頭,@後為數字或|和字母,.後為兩個以上的數字或|和字母 if(Reg.test(email)){validate();} else{s.innerHTML="請輸入正確郵箱地址";document.getElementById("email").value="";} } </script> </head> <body> <div class="short-cut"> <h1>歡迎註冊</h1> <h1><a href="login.html">已有帳號,請登入</a><h1> </div> <div class="w"> <form name="form1" method="post" action="register.php"> <table id="table1"> <tbody> <tr> <td><label for="loginname">登入名稱:</label></td> <td></td> <td><input id="loginname" type="text" name="login_name" maxlength="15" placeholder="" onfocus="userNameInfo()" onblur="checkUserName()" required></td> <td id="loginname_next_td"></td> </tr> <tr> <td><label for="password1">密碼:</label></td> <td></td> <td><input id="password1" type="password" name="password" maxlength="15" placeholder="建議至少使用兩種字元組合" onfocus="passwordInfo()" onblur="checkPassword()" required></td> <td id="password1_next_td"></td> </tr> <tr> <td><label for="password2">確認密碼:</label></td> <td></td> <td><input id="password2" type="password" name="password_confirm" maxlength="15" onfocus="passwordConfirmInfo()" onblur="checkPasswordConfirm()" required></td> <td id="password2_next_td"></td> </tr> <tr> <td><label for="phone">聯絡電話:</label></td> <td></td> <td> <input id="phone" type="text" name="phone" maxlength="11" onblur="checkPhone()" onfocus="phoneInfo()" required></td> <td id="phone_next_td"></td> </tr> <tr> <td><label for="vertificationCode">手機驗證碼</label></td> <td></td> <td> <input id="vertificationCode" type="text" name="vertificationCode" style="width:150px;" onblur="checkPhoneVertificationCode()" > <input id="vertificationCodeBtn" type="button" style="width:100px;font-size:14px;" value="獲取驗證碼" onclick="phoneVertificationCodeSend()"> </td> <td id="vertificationCode_next_td"></td> </tr> <tr> <td><label for="email">電子郵箱:</label></td> <td></td> <td><input id="email" type="email" name="email" maxlength="30" onfocus="emailInfo()" onblur="checkEmail()" required></td> <td id="email_next_td"></td> </tr> </tbody> </table> <table id="table2"> <tbody> <tr> <th><button type="submit" name="submit" value="註冊">註冊</button></th> <th><button type="reset">重置</button></th> </tr> </tbody> </table> </form> </div> </body> </html>
Code2   register.css
body{
font-family:arial, times, serif;
font-style:normal;
font-weight:normal;
font-size:16px;}

.short-cut{
margin-left:50px;
width:1248px;
height:60px;
background-color:transparent;
display:table;
border-bottom:5px solid lightgrey;
}

h1{
display:table-cell;
width:210px;
float:left;
vertical-align:middle;
font-size:24px;
}

h1:after{
visibility:hidden;
clear:both;
display:block;
height:0px;
content:".";}

.w{
position:relative;
top:0px;
left:90px;
width:1248px;
height:100%;
font-size:15px;}
}

#table1{
position:absolute;

width:50%;
margin-left:50px;
margin-top:50px;
}

#table1 td:nth-of-type(1){
width:90px;
height:55px;
border:0;
}
#table1 td:nth-of-type(2){
width:10px;
height:55px;
border:0;
}
#table1 td:nth-of-type(3){
width:300px;
height:54px;
border:1px;
}

#table1 td:nth-of-type(3) input{
width:250px;
height:35px;}

#table1 td:nth-of-type(3):after{
content:"*";
font-size:18px;
color:red;}

#table1 td:nth-of-type(4){
font-size:12px;
color:red;}



#table2{
border:0;
width:300px;}

button{
width:120px;
height:40px;
color:white;
background-color:rgb(2, 114, 188);
border-radius:10%;

}

Code3 checkUserName.php

<?php       
                mysql_connect("localhost","guest","guest123");  
                mysql_select_db("vt");  
                mysql_query("SET NAMES 'utf8'");  
                $sql = "SELECT username FROM user where username = '$_POST[username]'";  
                $result = mysql_query($sql);  
                $num = mysql_num_rows($result);  
                if($num)  
                {  
                  $list=array("result"=>"notValidate!");  
                }  
                else  
                {  
                  $list=array("result"=>"validate!");
              }  
                echo json_encode($list);//返回的是最外層加了雙引號的json          
      
    ?>  

Code4 checkPhone.php

<?php       
                mysql_connect("localhost","guest","guest123");  
                mysql_select_db("vt");  
                mysql_query("SET NAMES 'utf8'");  
                $sql = "SELECT phone FROM user where phone = '$_POST[phone]'";  
                $result = mysql_query($sql);  
                $num = mysql_num_rows($result);  
                if($num)  
                {  
                  $list=array("result"=>"notValidate!");  
                }  
                else  
                {  
                  $list=array("result"=>"validate!");
              }  
                echo json_encode($list);//返回的是最外層加了雙引號的json          
      
    ?> 


Code5 checkEmail.php

  <?php       
                mysql_connect("localhost","guest","guest123");  
                mysql_select_db("vt");  
                mysql_query("SET NAMES 'utf8'");  
                $sql = "SELECT email FROM user where email = '$_POST[email]'";  
                $result = mysql_query($sql);  
                $num = mysql_num_rows($result);  
                if($num)  
                {  
                  $list=array("result"=>"notValidate!");  
                }  
                else  
                {  
                  $list=array("result"=>"validate!");
              }  
                echo json_encode($list);//返回的是最外層加了雙引號的json          
      
    ?>  



Code6 phoneVertificationCodeSend.php

目的:生成隨機驗證碼放在session中,並利用阿里大於給使用者發驗證碼

<?php
    session_start();
    //生成4位隨機驗證碼,並存入快取
    function getRandomString($len, $chars=null)
    {
        if (is_null($chars)){
            $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        } 
        mt_srand(10000000*(double)microtime());
        for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < $len; $i++){
            $str .= $chars[mt_rand(0, $lc)]; 
        }
        return $str;
    }
    $vertiCode=getRandomString(4);
    $_SESSION['vertiCodeS']=$vertiCode;//給session中的vertiCodeS變數賦值
    
    //呼叫阿里大於簡訊驗證碼服務,給使用者發隨機驗證碼,$userName,$phone,$vertiCode為輸入的引數,電話號碼時必須的,
    //其他兩個引數是因為我在阿里大於簡訊模板中設定的引數
    function sendSMS($userName,$phone,$vertiCode){
    include "./alidayu_sdk/TopSdk.php"; 
    $c = new TopClient;
    $c->appkey ="";//你自己的appkey,需要在阿里大於建立應用(隨便什麼應用都行),以獲取appkey
    $c->secretKey ="";//你自己的secretKey
    $req = new AlibabaAliqinFcSmsNumSendRequest;
    $req->setSmsType("normal");
    $req->setSmsFreeSignName("大盈若衝");
    $req->setSmsParam("{\"userName\":\"$userName\",\"vertificationCode\":\"$vertiCode\"}");
    $req->setRecNum("$phone");
    $req->setSmsTemplateCode("");
    $resp = $c->execute($req);
    echo $resp;
    var_dump($resp);
    //if($resp->result->success){echo true;}
    //else{echo false;}
    }
    sendSMS($_POST[username],$_POST[phone],$vertiCode);
?>


Code7 checkPhoneVertificationCode.php

//把使用者輸入的驗證碼和session中存的驗證碼進行對比

<?php
    session_start();
//    echo $_SESSION['vertiCodeS'];
    if($_SESSION['vertiCodeS']==$_POST["inputVertiCode"]){ 
      $list=array("result"=>"validate!");
    }
    else{
      $list=array("result"=>"notValidate!");
    }                 
     echo json_encode($list);
?>


Code8 register.php

//提交表單後,把變數存在資料庫中,(首先需要在資料庫中建立表,這步省略)

  <?php  
        if(isset($_POST["submit"]) && $_POST["submit"] == "註冊")  
        {  
            $user = $_POST["login_name"];  
            $psw = $_POST["password"];  
            $psw_confirm = $_POST["password_confirm"];
            $phone=$_POST["phone"];
            $email=$_POST["email"];  
            $vertificationCode=$_POST["vertificationCode"];
       
            if($user == "" || $psw == "" || $psw_confirm == "" || $phone== "" || $email== "" || $vertificationCode == "")  
            {  
                echo "<script>alert('請確認資訊完整性!'); history.go(-1);</script>";  
            }  
            else  
            {  
                if($psw == $psw_confirm)  
                {  
                    mysql_connect("localhost","guest","guest123");   //連線資料庫  
                    mysql_select_db("vt");  //選擇資料庫  
                    mysql_query("SET NAMES 'utf8'"); //設定字符集  
                    $sql = "SELECT username FROM user WHERE username = '$_POST[login_name]'"; //SQL語句  
                    $result = mysql_query($sql);    //執行SQL語句  
                    $num = mysql_num_rows($result); //統計執行結果影響的行數  
                    if($num)    //如果已經存在該使用者  
                    {  
                        echo "<script>alert('使用者名稱已存在'); history.go(-1);</script>";  
                    }  
                    else    //不存在當前註冊使用者名稱稱  
                    {  
                        $sql_insert = "INSERT INTO user (username,password,phone,email) VALUES('$_POST[login_name]','$_POST[password]','$_POST[phone]','$_POST[email]')";  
                        $res_insert = mysql_query($sql_insert);  
                        //$num_insert = mysql_num_rows($res_insert);  
                        if($res_insert)  
                        {  
                            echo "<script>alert('註冊成功!'); </script>";  
                        }  
                        else  
                        {  
                            echo "<script>alert('系統繁忙,請稍候!'); history.go(-1);</script>";  
                        }  
                    }  
                }  
                else  
                {  
                    echo "<script>alert('密碼不一致!'); history.go(-1);</script>";  
                }  
            }  
        }  
        else  
        {  
            echo "<script>alert('提交未成功!'); history.go(-1);</script>";  
        }  
    ?>  

二、登入介面:

    我的登入介面做的較簡單,提交以後才開始檢驗。


login.html

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html">
<meta charset="utf-16">
<meta name="keywords" content="keyword1,keword2,keyword3">
<meta name="description" content="你網頁的描述">
<meta name="author" content="zhenglulu" >
<meta name="copyright" content="">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>I am login</title>
<link rel="stylesheet" type="text/css" href="login.css">
<style type="text/css">

</style>  
</head>
<body>
<div class="short-cut">
<h1>歡迎登入</h1>
</div>

<div class="w">
<form name="form1" method="post" action="login.php">
<table id="table1">  
<tbody>
<tr>
<td>登入名稱:</td>
<td></td>
<td><input id="loginname" type="text" name="login_name" maxlength="15" placeholder="您的賬戶名和登入名" required></td>
<td><a href="register.html">註冊</a></td>
</tr>
<tr>
<td>密碼:</td>
<td></td>
<td><input id="password1" type="password" name="password" maxlength="15"  placeholder="密碼" required></td>
<td><a href="">忘記密碼</a></td>
</tr>
</tbody>
</table>

<table id="table2">
<tbody>
<tr>
<th><button type="submit" name="submit" value="登入">登入</button></th>
<th><button type="reset">重置</button></th>
</tr>
</tbody>
</table>

</form>
</div>

</body>
</html> 


login.css

body{
font-family:arial, times, serif;
font-style:normal;
font-weight:normal;
font-size:12px;}

.short-cut{
margin-left:50px;
width:1248px;
height:60px;
background-color:transparent;
display:table;
border-bottom:5px solid lightgrey;
}

h1{

display:table-cell;
vertical-align:middle;
font-size:30px;
}

.w{
position:relative;
top:0px;
left:50px;
width:1248px;
height:100%;
font-size:15px;}
}

#table1{
position:absolute;

width:50%;
margin-left:50px;

}

#table1 td:nth-of-type(1){
width:90px;
height:75px;
border:0;
}
#table1 td:nth-of-type(2){
width:10px;
height:75px;
border:0;
}
#table1 td:nth-of-type(3){
width:250px;
height:70px;
border:1px;
}

#table2{
border:0;
width:300px;}

button{
width:120px;
height:40px;
color:white;
background-color:rgb(2, 114, 188);
border-radius:10%;

}

login.php

<?php  
        if(isset($_POST["submit"]) && $_POST["submit"] == "登入")  
        {  
            $user = $_POST["login_name"];  
            $psw = $_POST["password"];  
            if($user == "" || $psw == "")  
            {  
                echo "<script>alert('請輸入使用者名稱或密碼!'); history.go(-1);</script>";  
            }  
            else  
            {  
                mysql_connect("localhost","guest","guest123");  
                mysql_select_db("vt");  
                mysql_query("SET NAMES 'utf8'");  
                $sql = "SELECT username,password FROM user where username = '$_POST[login_name]' and password = '$_POST[password]'";  
                $result = mysql_query($sql);  
                $num = mysql_num_rows($result);  
                if($num)  
                {  
                    $row = mysql_fetch_array($result);  //將資料以索引方式儲存在陣列中  
                    //echo $row[0];
                    echo "<script>alert('登入成功!');</script>";  
                }  
                else  
                {  
                    echo "<script>alert('使用者名稱或密碼不正確!');history.go(-1);</script>";  
                }  
            }  
        }  
        else  
        {  
            echo "<script>alert('提交未成功!'); history.go(-1);</script>";  
        }  
      
    ?>  


相關推薦

一個簡單註冊登入頁面包括阿里大於手機驗證html+JS+AJAX+PHP

        背景:非計算機專業,在校學習期間,接觸過linux,perl,C語言。今年畢業以後學了一段時間的html/css/javascript,最近找到一份PHP程式設計師工作。面試的時候,HR讓我回去做個註冊登入頁面,花了三天時間做了個簡單的註冊登入頁。現在把程式

android -簡單註冊登入頁面應用

小白今天寫了一段註冊登入程式碼與大家分享不足請指出 首先寫一個javabean package com.my.domain; public class User {private String account;//賬號private String password;//密碼

初遇C#:一個簡單的小程序圓形周長,面積計算器

編碼 雙精度 崩潰 輸入 面向對象 窗口 語句 readline 面向對象的語言 作為一個面向對象的語言,與用戶的交互很關鍵! 在此,我們可以先分析一下我們這個小程序要與用戶交互的內容:1.命名很重要,讓用戶看見這個程序就知道這個程序的作用。 2.當用戶打開這個程序時,提示

一個簡單的MapReduce示例多個MapReduce任務處理

.lib exceptio apr private util sum length reat lin 一、需求   有一個列表,只有兩列:id、pro,記錄了id與pro的對應關系,但是在同一個id下,pro有可能是重復的。   現在需要寫一個程序,統計一下每個id下有

利用文件打開方式with open('文件名',方式) as 變量名做一個簡單的復制排除大文件bug

family rwx usr linux 利用 免除 數據 都是 lines 1 #!usr/bin/env python 2 #-*- coding=utf-8 -*- 3 4 with open(‘b.py‘,‘r‘) as obj1, open(‘c.py‘

學習 WebService 第三步:一個簡單的實例SoapUI測試REST項目

方法 資源 ima .com required tle margin 導出 ont 原文地址:SOAPUI測試REST項目(六)——REST服務和WADL ↑↑↑ 原文用的SoapUI,2018-3-19時,這個軟件已經更名為ReadyAPI(集成了SoapUI),因此下文

用Python socket實現一個簡單的http伺服器post 與get 的區別、CGIHTTPServer 簡單應用

#!/usr/bin/env python #coding=utf-8import socketimport re HOST = '' PORT = 8000#Read index.html, put into HTTP response dataindex_content = '''HTTP/1.x 200

Python計算一個目錄下所有檔案包括子目錄中所有檔案指定的檔案型別個數

 輸入工程名計算一個工程專案中C++,Java,Python,GO語言的檔案個數,並找出Python檔案中最大檔案的檔名 1、先讀取檔案地址,找到該資料夾 import os import os.path path = 'C:/python學習/Python作業/' +

使用Hexo的搭建一個簡單的博客一步兩個坑

iss 正文 博文 修改配置 默認 save pic adding 就是 搭建好簡潔的博客框架後,回看時發現,簡潔之中透露著一絲絲簡陋,好的,網上關於豐富hexo的文章也很多 記錄一下自己的一些瞎操作。 在你的hexo目錄下,你可以看到themes文件夾裏有個默認的la

使用truelicense實現用於JAVA工程license機制包括license生成和驗證

參數 cat this false sem inf import 存儲密碼 dos命令 開發的軟件產品在交付使用的時候,往往會授權一段時間的試用期,這個時候license就派上用場了。不同於在代碼中直接加上時間約束,需要重新授權的時候使用license可以避免修改源碼,改

javaWeb 簡單註冊登入(含資料庫連線) -- 頁面

說在前面: 自己嘗試下寫了這個, 最近web學的東西都在裡面了, 雖然還是很渣, 但也算第一步了, 我姑且算它為一個“專案”, 咳咳 今天剛看到十年前一位學長的畢業設計報告(AOJ評測系統), 只能%%%, 不知道我畢業時能寫出什麼東西來 專案

nodejs+mongodb寫的一個簡單登入註冊

自己自學Nodejs 中   隨便寫著玩的  沒學到資料集過濾 就自己想了個笨辦法 還不完善 自己練手了 ----------------------------------------------------------------------以下是伺服器

Android學習筆記第一行程式碼一個簡單登入介面

一.建立xml檔案 1.賬戶輸入框和密碼輸入框的編寫 <TextView android:layout_height="wrap_content" android:text="@string/LG_name" />

新手教你學Spring MVC4.0+MyBatis+MySQL5.0實現簡單使用者註冊登入程式

本篇是實現使用者註冊登入程式的第一篇。 0、 效果預覽篇 1. 使用者註冊 2. 使用者登入 1、專案預覽及環境配置 環境: Win10+Intellij idea+Navicat for mysql+Maven3.

javaWeb 簡單註冊登入(含資料庫連線) -- 四) 使用者登入請求與響應

這篇講登入處理 傳進來什麼 user, pass 判什麼 使用者名稱是否存在 基於1中已存在的情況下判斷密碼是否匹配 響應頁面 login.jsp: 1. 當登入成功, 寫一個新頁面, 並顯示該使用者的Sno 2. 失敗則在登入頁

WCF學習——構建一個簡單的WCF應用

frame port app 位置 協定 enc splay msdn ons 本文的WCF服務應用功能很簡單,卻涵蓋了一個完整WCF應用的基本結構。希望本文能對那些準備開始學習WCF的初學者提供一些幫助。 在這個例子中,我們將實現一個簡單的計算器和傳統的分布式通信框架一樣

一個簡單的防火墻iptables實例

dnat drop out bin war _for 轉換 其他 lis #!/bin/bash##for centos7 iptables table##yum install iptables-services -y###規則的排列是有順序的##清除默認規則 iptab

簡單的切換頁面類似於微信

stat urn ima http end elf int idt lis //在App.js中實現import React from ‘react‘; import { StyleSheet, Text, View } from ‘react-native‘; impo

bootstrap 一個簡單的登陸頁面

window tran 修改 min tle mar text ace rap 效果如圖:用bootstrap 寫的一個簡單的登陸 一、修改樣式 樣式可以自己調整,例如換個背景色之類的,修改 background-color屬性就可以 #from

tkinter做一個簡單的登陸頁面

簡單 ble command inpu pre color right lac png 做一個簡單的登陸頁面 1 import tkinter 2 3 wuya = tkinter.Tk() 4 wuya.title("wuya") 5 wuya.geomet