php $_SESSION会员登录实例分享_php技巧

WBOY
Release: 2016-05-16 19:55:33
Original
1515 people have browsed it

php会员登录模块是网站开发中很简单的一个模块,本实例主要给php初学者一个简单的参考,其中的逻辑还是要读者自己领会,多编多思考。
login.php文件

<?php ob_start(); session_start(); ?> <? // error_reporting(E_ALL); // ini_set("display_errors", 1); ?>   Tutorialspoint.com   

Enter Username and Password

Click here to clean Session.
Copy after login

Logout.php文件

<?php session_start(); unset($_SESSION["username"]); unset($_SESSION["password"]); echo 'You have cleaned session'; header('Refresh: 2; URL=login.php'); ?>
Copy after login

以上就是本文的全部内容,希望对大家的学习有所帮助。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!