 08 Cookie, Session与HTTP请求 杨亮 《PHP语⾔程序设计》Cookie, Session 与HTTP请求 杨亮 Web基本流程 PC Mobile 服务器 (Apache) (IIS) 后端脚本 (PHP) (JSP) (ASP) 数据库 (MySQL) (Oracle) (Access) HTTP 请求 对应⽂文件 获取数据 返回数据 返回⻚页⾯面 返回⻚页⾯面 请求⻚页⾯面 服务器端 客户端 html css 公交卡 银⾏行卡 如果⼀一家咖啡店,买五杯送⼀一杯 信息存在哪⾥里? 超⽂文本传输协议 HTTP HyperText Transfer Protocol ⽆无状态 Cookie Session 头部 内容 (html) Cookie 保存在浏览器端的⽤用户数据,⽤用以进⾏行会话控制 浏览器端脚本(JavaScript)设定Cookie 服务器端程序(PHP)通过HTTP请求命令浏览器设定Cookie login.htm Session 保存在服务器端的⽤用户数据,⽤用以进⾏行会话控制 每个会话有⼀一个session id存在Cookie中,⽤用以标⽰示session Session由于是存在服务器端,只能由服务器端脚本(PHP)设置 Session启动 session_start() 是否有 session存在 启动对应的 session 创建新的 session N Y Session注销0 码力 | 12 页 | 1.30 MB | 1 年前3 08 Cookie, Session与HTTP请求 杨亮 《PHP语⾔程序设计》Cookie, Session 与HTTP请求 杨亮 Web基本流程 PC Mobile 服务器 (Apache) (IIS) 后端脚本 (PHP) (JSP) (ASP) 数据库 (MySQL) (Oracle) (Access) HTTP 请求 对应⽂文件 获取数据 返回数据 返回⻚页⾯面 返回⻚页⾯面 请求⻚页⾯面 服务器端 客户端 html css 公交卡 银⾏行卡 如果⼀一家咖啡店,买五杯送⼀一杯 信息存在哪⾥里? 超⽂文本传输协议 HTTP HyperText Transfer Protocol ⽆无状态 Cookie Session 头部 内容 (html) Cookie 保存在浏览器端的⽤用户数据,⽤用以进⾏行会话控制 浏览器端脚本(JavaScript)设定Cookie 服务器端程序(PHP)通过HTTP请求命令浏览器设定Cookie login.htm Session 保存在服务器端的⽤用户数据,⽤用以进⾏行会话控制 每个会话有⼀一个session id存在Cookie中,⽤用以标⽰示session Session由于是存在服务器端,只能由服务器端脚本(PHP)设置 Session启动 session_start() 是否有 session存在 启动对应的 session 创建新的 session N Y Session注销0 码力 | 12 页 | 1.30 MB | 1 年前3
 CakePHP Cookbook Documentation 5.xReading Where to Get Help CakePHP Conventions CakePHP Folder Structure Quick Start Guide Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database ->withConsecutive() has been removed data providers have to be static Tutorials & Examples Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths0 码力 | 1080 页 | 939.39 KB | 1 年前3 CakePHP Cookbook Documentation 5.xReading Where to Get Help CakePHP Conventions CakePHP Folder Structure Quick Start Guide Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database ->withConsecutive() has been removed data providers have to be static Tutorials & Examples Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths0 码力 | 1080 页 | 939.39 KB | 1 年前3
 CakePHP Cookbook 4.x
Reading Where to Get Help CakePHP Conventions CakePHP Folder Structure Quick Start Guide Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database 5 Migration Guide Upgrading to 4.5.0 Deprecations New Features Tutorials & Examples Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths0 码力 | 1249 页 | 1.04 MB | 1 年前3 CakePHP Cookbook 4.x
Reading Where to Get Help CakePHP Conventions CakePHP Folder Structure Quick Start Guide Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database 5 Migration Guide Upgrading to 4.5.0 Deprecations New Features Tutorials & Examples Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths0 码力 | 1249 页 | 1.04 MB | 1 年前3
 10 WEB攻击与防护技术 徐震 杨亮 《PHP语⾔程序设计》Cross Site Scripting (XSS) A7 – Broken Authentication and Session Management A3 – Broken Authentication and Session Management A4 – Insecure Direct Object Reference A4 – Insecure Direct (CSRF) A5 – Cross Site Request Forgery (CSRF) 10 WEB攻击与防护技术 徐震 杨亮 《PHP语⾔程序设计》Cross Site Scripting (XSS) A7 – Broken Authentication and Session Management A3 – Broken Authentication and Session Management A4 – Insecure Direct Object Reference A4 – Insecure Direct (CSRF) A5 – Cross Site Request Forgery (CSRF)- Management> A6 – Security Misconfiguration (NEW) A10 – Failure to Restrict URL Access A7 – Failure 65 概述 n Broken Authentication and Session Management q Web应用程序中的身份验证相关功能存在缺陷,可 能导致认证信息或会话管理数据泄漏,造成使用者 或管理者的身份被盗用 q 典型攻击类型:Session Fixation、Session Hijack 原理 n HTTP协议是一种无状态协议,而WEB应用则需要维 0 码力 | 114 页 | 3.65 MB | 1 年前3
 CakePHP Cookbook Documentation 5.x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Quick Start Guide 15 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4 Tutorials & Examples 45 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 . . . . . 662 28 Sessions 665 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 Built-in Session Handlers & Configuration . . . .0 码力 | 848 页 | 2.53 MB | 1 年前3 CakePHP Cookbook Documentation 5.x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Quick Start Guide 15 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4 Tutorials & Examples 45 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 . . . . . 662 28 Sessions 665 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 Built-in Session Handlers & Configuration . . . .0 码力 | 848 页 | 2.53 MB | 1 年前3
 CakePHP Cookbook 4.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Quick Start Guide 15 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4 Tutorials & Examples 69 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 . . . . . 764 27 Sessions 767 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767 Built-in Session Handlers & Configuration . . . .0 码力 | 967 页 | 2.88 MB | 1 年前3 CakePHP Cookbook 4.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Quick Start Guide 15 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4 Tutorials & Examples 69 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 . . . . . 764 27 Sessions 767 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767 Built-in Session Handlers & Configuration . . . .0 码力 | 967 页 | 2.88 MB | 1 年前3
 CakePHP Cookbook 3.x
Reading Where to Get Help CakePHP Conventions CakePHP Folder Structure Quick Start Guide Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database 3.0 Migration Guide 3.0 Migration Guide New ORM Upgrade Guide Tutorials & Examples Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths0 码力 | 1244 页 | 1.05 MB | 1 年前3 CakePHP Cookbook 3.x
Reading Where to Get Help CakePHP Conventions CakePHP Folder Structure Quick Start Guide Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database 3.0 Migration Guide 3.0 Migration Guide New ORM Upgrade Guide Tutorials & Examples Content Management Tutorial Getting CakePHP Checking our Installation CMS Tutorial - Creating the Database Database Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths0 码力 | 1244 页 | 1.05 MB | 1 年前3
 CakePHP Cookbook 3.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Quick Start Guide 13 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4 Tutorials & Examples 109 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 . . . . . 777 27 Sessions 781 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 Built-in Session Handlers & Configuration . . . .0 码力 | 967 页 | 2.80 MB | 1 年前3 CakePHP Cookbook 3.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Quick Start Guide 13 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4 Tutorials & Examples 109 Content Management Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 . . . . . 777 27 Sessions 781 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 Built-in Session Handlers & Configuration . . . .0 码力 | 967 页 | 2.80 MB | 1 年前3
 CakePHP Cookbook 2.x
topics Shell Helpers Running Shells as cronjobs Completion Shell Code Generation with Bake Schema management and migrations I18N shell ACL Shell Test shell Upgrade shell Development Configuration Database Classes Router API Sessions Session Configuration Built-in Session handlers & configuration Setting ini directives Creating a custom session handler Reading & writing session data Exceptions Exception a message to a session variable to be displayed on the page after redirection. In the layout we have FlashHelper::render() which displays the message and clears the corresponding session variable. The controller’s0 码力 | 1096 页 | 958.62 KB | 1 年前3 CakePHP Cookbook 2.x
topics Shell Helpers Running Shells as cronjobs Completion Shell Code Generation with Bake Schema management and migrations I18N shell ACL Shell Test shell Upgrade shell Development Configuration Database Classes Router API Sessions Session Configuration Built-in Session handlers & configuration Setting ini directives Creating a custom session handler Reading & writing session data Exceptions Exception a message to a session variable to be displayed on the page after redirection. In the layout we have FlashHelper::render() which displays the message and clears the corresponding session variable. The controller’s0 码力 | 1096 页 | 958.62 KB | 1 年前3
 Laravel 3.2 Documentationdesigned for their application. This may be most beneficial to large projects such as content-management-systems. This kind of architectural flexibility is unique to Laravel. Throughout the documentation structure to Blade template engine.  Added Blade comments.  Added simpler environment management.  Added Blade::extend() method to define custom blade compilers.  Added View::exists helper, similar to pluck method in Underscore.js.  Allow the registration of custom cache and session drivers.  Allow the specification of a separate asset base URL for using CDNs.  Allow a starter0 码力 | 139 页 | 1.13 MB | 1 年前3 Laravel 3.2 Documentationdesigned for their application. This may be most beneficial to large projects such as content-management-systems. This kind of architectural flexibility is unique to Laravel. Throughout the documentation structure to Blade template engine.  Added Blade comments.  Added simpler environment management.  Added Blade::extend() method to define custom blade compilers.  Added View::exists helper, similar to pluck method in Underscore.js.  Allow the registration of custom cache and session drivers.  Allow the specification of a separate asset base URL for using CDNs.  Allow a starter0 码力 | 139 页 | 1.13 MB | 1 年前3
共 76 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8














