PHP网页密码验证
2018-7-11 乱云飞 代码 评论(0) 浏览(883) 标签: php代码 网页密码 密码验证 PHP密码
<?php //页面密码验证 header("Content-Type: text/html; charset=utf-8");//防止乱码 session_start(); if(isset($_POST['password']) && $_POST['password'] == '80c.cc'){ $_SESSION['ok'] = 1; header('location:?'); } if(!isset($_SESSION['ok'])){ exit(' <form method="post"> <input type="password" name="password" value="" placeholder="请输入密码" /> <input type="submit" value="登陆" /> </form> '); }