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

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>