久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      詳細(xì)介紹php傳遞數(shù)據(jù)的兩種方式

      本文通過幾個(gè)簡(jiǎn)單實(shí)例帶大家詳細(xì)了解php傳遞數(shù)據(jù)的兩種方式:get方式和post方式,有需要的小伙伴可以參考下。

      詳細(xì)介紹php傳遞數(shù)據(jù)的兩種方式

      一.通過get方式提交數(shù)據(jù)

      比如:https://www.php.net?參數(shù)名=參數(shù)值&參數(shù)名=參數(shù)值

      在服務(wù)器端(請(qǐng)求的php文件這邊)可以通過$_GET來獲取到,$_GET索引值為參數(shù)名,索引對(duì)應(yīng)的數(shù)據(jù)就是參數(shù)值。通過get方式提交的數(shù)據(jù)在網(wǎng)站搜索欄是可以看見的,同時(shí)也可以在網(wǎng)站搜索欄里填寫數(shù)據(jù)

      詳細(xì)介紹php傳遞數(shù)據(jù)的兩種方式

      二.通過post方式提交數(shù)據(jù)

      比如表單是通過post發(fā)送過來的,可以通過$_POST來獲取到。

      <body>     <form method="POST">     姓名:<input type="text" name="username" />     <br />     性別:<input type="text" name="sex" />     <br />     <input type="submit" value="提交" />     </form> </body>

      通過post方式提交的數(shù)據(jù),數(shù)據(jù)不可見

      詳細(xì)介紹php傳遞數(shù)據(jù)的兩種方式

      三.post和get的區(qū)別

      從安全性上來講,get提交的數(shù)據(jù)在url欄可以看見,而post提交的數(shù)據(jù)是不可見的,因此post更安全。

      從提交原理上講, get提交是參數(shù)一個(gè)一個(gè)的提交,post提交是所有參數(shù)作為一個(gè)整體一起提交。

      從提交數(shù)據(jù)的大小上來講, get提交一般不超過255個(gè)字節(jié),post提交的大小取決于服務(wù)器。

      從靈活性上講,get很靈活,只要有頁(yè)面的跳轉(zhuǎn)就可以傳遞參數(shù),post不靈活,post提交需要有表單的參與。

      推薦:php視頻教程 php教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)