Everything About PHP Sessions

所在平台: Udemy

课程主页: https://www.udemy.com/course/everything-about-php-sessions/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**课程名称:PHP Session 全解析** **课程概述:** PHP Session 是实现服务器与客户端之间通信的关键机制,它能够帮助 Web 应用程序记住访客身份以及相关的变量和数据。本课程是一项实践性强、挑战性高的项目导向课程,旨在帮助开发者将 PHP 通常存储在纯文本文件中的数据迁移到更安全的数据库中,以便按需读取和销毁记录。 课程将指导您完成以下内容: * **环境搭建:** 设置 SQL 数据库。 * **Session 对象:** 定义用于打开和关闭 Session 的类。 * **数据管理:** 实现读取、写入 Session 变量、销毁 Session 以及管理过期记录的功能。 * **安全性:** 将 Session 数据存储在 MySQL 数据库中,提高安全性。 * **自动登录:** 创建一个使用随机生成的单次使用令牌(token)的自动登录系统,该系统能够识别返回用户并在不同计算机之间保留其数据。 **课程亮点:** * **深入理解 PHP Session:** 从 Session 的工作原理和纯文本文件存储方式开始,全面了解 Session 的运作机制。 * **数据库存储:** 学习如何将 Session 数据安全地存储在 MySQL 数据库中。 * **自定义 Session 处理:** 掌握如何定义类来实现 Session 的打开、关闭、读写和销毁。 * **高级功能:** 学习如何进行垃圾回收,清除过期 Session 记录。 * **实践项目:** 通过构建一个自动登录系统,巩固所学知识,实现用户数据的持久化。 * **安全性强调:** 课程将强调 Session 安全的重要性,包括使用 SSL/TLS 和在访问敏感内容前进行用户凭据重验证。 **课程目标:** 完成本课程后,您将能够: * 熟练使用 PHP Session 存储和管理用户数据。 * 安全地将 Session 数据存储在数据库中。 * 实现功能完善的自动登录系统。 * 理解并应用 Session 安全的最佳实践。 **重要提示:** 尽管持久化 Session 提供了便利性,但它们并非 100% 安全。课程将强调始终使用安全套接字层 (SSL) 或传输层安全 (TLS) 连接,并将始终在允许访问敏感内容(如更改用户账户详情)的页面之前重新验证用户凭据。

课程评论(0条)

课程详情

PHP tireless sessions allow for communication between the server and client. This allows web applications to remember the identities of visitors as well as any variables or other data. This practical and challenging project-based course will help developers take the data that PHP normally stores in plain text files and write them into a more secure database, where the records can be read and destroyed as needed. I help you set up a SQL database, define classes to open and close sessions, read and write variables, destroy sessions, and manage out-of-date records. The lessons culminate in a short project that uses tokens to recognize returning users in an auto-login scenario. In this course: I'll show you how to store session in data in a MySQL databaseHow to log in returning users automatically We'll begin with an overview of how PHP handles Sessions and stores session data in plain text files on the web server We'll set up a database to store session data more securelyI'll show you how to define a class to open and close sessionsRead and write session variables to the databaseDestroy sessions and garbage collect out-of-date records Sessions expire as soon as soon as the browser is closed, but the highlight of this course is an auto-login system that uses a randomly generated single use token that recognizes returning users and preserves their data between visits, even on different computers. I hope you'll find this a useful and challenging project. keeping the user's data always up to date with persistent sessions is extremely convenient. But, and I can't stress this strongly enough, persistent sessions are not 100 percent secure. When using sessions, you should always use a connection over secure sockets layer, or transport layer security whenever possible. I'm going to talk about why always re-authenticate user credentials before allowing allowing access to pages with sensitive content, such as changing user account details.

课程标签

0人关注该课程

主题相关的课程