PHP密码登陆显示要显示的内容
<?php
$adminkey = "admin"; /*-----------------请在上面修改登陆密码,默认密码是admin---------------- */
session_start();
if(@$_POST['password'] == $adminkey){
$_SESSION['login'] = md5($adminkey);
?>
登陆成功
<a href="?logout" style="color: red;">退出登录</a>
<?}
//if($_SERVER['QUERY_STRING'] == "logout"){
// $_SESSION['login'] = "";
//header("location: " . $_SERVER['PHP_SELF']); exit();
else{
?>
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
div{text-align:center; margin:0 auto;}
#loginform{width:350px;height:100px;background-color:#F8F8FF;box-shadow: 1px 1px 1px 1px #888888;}
</style>
</head>
<body>
<div id="loginform">
<div style="text-align:center; margin:30px auto 0px;">
<form action="" method="post"> 独立查看密码
<input type="password" name="password" style="width:120px; margin-top: 35px;">
<input type="submit" value="登录" style="margin-left: 5px;">
</form>
</div>
</div>
</body>
</html>
<?}?>
声明
源码下载不顺利,比如源码在百度网盘的有时会被无故取消等,请联系QQ:46667551
本站大部分下载资源收集于网络,但除特别说明之外,基本全部亲自测试可用!
但由于某些源码的更新迭代,比如微信小程序官方接口的变动等原因,
如时间过长,可能会造成本可以使用的代码出现问题,下载前请斟酌!
本站资源仅供学习和交流使用,版权归原作者所有,请在下载后24小时之内自觉删除。
若作商业用途,请购买正版,由于未及时购买和付费发生的侵权行为,使用者自行承担,概与本站无关。
原文链接:https://www.love0312.com/1525.html,转载请注明出处
上一篇:str_replace替换用法
下一篇:PHP如何将网页生成HTML