Blogger Information
Blog 23
fans 1
comment 0
visits 19783
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP运行原理及get和post提交数据方法-2019年4月15日
蛋糕356的博客
Original
1022 people have browsed it

一、手绘PHP运行原理如图QQ图片20190416041207.jpg

二、PHP中get提交方法:提交数据以明文发送,数据不安全,传输数据有大小限制,案例代码如下

实例

<?php
if (!empty($_GET)){
    print_r($_GET);}else{
    print("请输入邮箱或密码");
}
?>
<!doctype html>
<html>
<head>
    <title>
        get提交
    </title>
</head>
<body>
<form action="" method="get">
<p>
    邮箱:<input type="email" name="email" value="">
</p>
<p>
    密码:<input type="password" name="password" value="">
</p>
<button>登录</button></form>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

三、PHP中post提交数据方法:提交数据不以明文发送,发送数据比较安全,传输数据也有大小限制,但比get提交的方法传输的数据要大得多,案例代码如下:

实例

<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/16
 * Time: 4:06
 */
if (!empty($_POST)){
    print_r($_POST);}else{
    print("请输入邮箱或密码");
}
?>
<!doctype html>
<html>
<head>
    <title>
        post提交
    </title>
</head>
<body>
<form action="" method="post">
<p>
    邮箱:<input type="email" name="email" value="">
</p>
<p>
    密码:<input type="password" name="password" value="">
</p>
<button>登录</button></form>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments