练习post传值(手写)
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<form action="" method="post">
账号:<input type="text" name="name" value="33703259">
密码:<input type="password" name="pass" value="123456">
<button>提交登陆</button>
</form>
<?php
echo '<hr>';
echo $_POST[name];
echo '<hr>';
echo $_POST[pass];
echo '<hr>';
?>
</body>
</html>
函数自学
<?php
//ceil进一取整计算
echo ceil(9.4);
//floor舍去一取整计算
echo floor(9.4);
//round四舍五入计算
echo round(9.5446);
echo round(9.4446);
//取数组内最大数
echo max(1, 2, 8, 100);
//取数组内最小数
echo min(1, 2, 8, 100);
//mt_rand取范围内随机值
echo mt_rand(1, 1000);
//strtolower字母转小写
echo strtolower('WDASDASD');
//strtoupper字母转大写
echo strtoupper('xzcxzczxc');
//md5编码加密
echo md5('PHP中文网');
//取当前时间
echo date(Y年m月d日h时i分s秒);