批改状态:未批改
老师批语:
一、手绘PHP运行原理如图
二、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>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号