ios-html-get/post的區別,一言以蔽之(MS)CheckST

get直接拽拿數據,post注入服務器,爲了服務器的安全還是用get

而因爲get是明文傳,密碼賬號一眼就能看出來,即使加密也可以很容易的破解,所以傳密碼用post即使對服務器不安全。





網絡編程

第三方:ASI最強大,http終結者,可惜不更新

AFN簡單應用

URL統一資源定位符:包括:協議、域名、端口號(具體地址)

URI統一資源標示符


請求方法

get:服務器直接拿過來,明文傳,傳的數據量小,

post:注入服務器,但對服務器不安全,賬號密碼私密的最好用它


一句話gai

get直接拽拿數據,post注入服務器,爲了服務器的安全還是用get

而因爲get是明文傳,密碼賬號一眼就能看出來,即使加密也可以很容易的破解,所以傳密碼用post即使對服務器不安全。





打開html的方法順序:


本地localhost


sudo apachectl start



1、1

創建other點擊EMPTY創建名字爲testNet.html的文件,內容如下


<html>

    <head></head>

    <title>jeredu</title>

    

    

    <body>

        my first web

    </body>

    

    

</html>


1、2

兩個a之間是超文本鏈接,在網頁顯示get,點擊get跳轉到該網址並賦值name=zhangsan&pwd=123類似明文傳值


創建other點擊EMPTY創建名字爲s.html的文件,內容如下


<html>

    <head></head>

    <title>get</title>



    <body>

       <a href="http://localhost/testNet.html?name=zhangsan&pwd=123">get </a>

    </body>



</html>


2.1打開終端

Last login: Thu Jun 11 09:25:10 on ttys006

zhangxindeMacBook-Pro:~ zhangxin$ sudo apachectl start

Password:

/System/Library/LaunchDaemons/org.apache.httpd.plist: Operation already in progress


輸入IP地址;

http://IP地址

顯示It Works!網絡正常可以發送請求


2.2

打開硬盤,選擇資源庫,WebServer文件夾下的Documents,將新建的html文件拖入此文件夾並鑑定即可



POST:

post <form>表單提交 <tr>行,有幾行,幾個tr,行裏面有列《td》,一行也可以有多列


post.html

<html>

    <head>

       <title>

          post

       </title>

    </head>

    <body>

           <form action="http://localhost/testNet.html" method="POST">

               

               <table style="width:300px;margin:0 auto">

                   <tr>

                       <td >userName:</td>

                       <td><input type="text" name="userName"/></td>

                   </tr>

                   

                   <tr>

                       <td>passWorld:</td>

                       <td><input type="password" name="psw"/></td>

                   </tr>

               

               </table>

               

               <input type="submit" value="submit" style="margin:100 0 0 450" />

           </form>

   

    </body>

</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章