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

來源:互聯網
上載者:User

標籤:ios   html   post   get   網路   

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>

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.