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 年前3Laravel 5.0 Documentation
Queued Commands v. Command Pipeline vi. Core Extension i. Managers & Factories ii. Cache iii. Session iv. Authentication v. IoC Based Extension vii. Elixir i. Introduction ii. Installation & Setup Queue Worker vi. Push Queues vii. Failed Jobs xix. Session i. Configuration ii. Session Usage iii. Flash Data iv. Database Sessions v. Session Drivers xx. Templates i. Blade Templating ii. Other may customize, will automatically be issued, and the error messages will be either flashed to the session or converted to JSON. Form validation has never been more simple. For more information on FormRequest0 码力 | 242 页 | 1.44 MB | 1 年前3CakePHP Cookbook 2.x
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’s 6. The controller may use components to further refine the data or perform other operations (session manipulation, authentication, or sending emails, for example). 7. Once the controller has used models0 码力 | 1096 页 | 958.62 KB | 1 年前3Laravel 5.2 中文文档
持、隐式模型绑定、简化 Eloquent 全局作用域、可选择的认证脚手架、中间件组、访问频 率限制、数组输入验证优化等等。 多认证驱动 在之前的 Laravel 版本中,框架只支持默认的、基于 session 的认证驱动,且在单个应 用中只能拥有一个认证模型类(对应单张表),这为我们实现某型功能,比如前后端分离 登录带来麻烦。 我们对此进行了改进,在 Laravel 5.2 中,你可以定义多个认证驱动,还有多个认证模型 中间件组 中间件组允许你通过单个方便的键来对相关路由中间件进行分组,从而为某个路由一次指 定多个中间件。例如,在同一个应用中构建 Web UI 或 API 时这一特性很有用,你可以 将 session 和 csrf 路由分组到一个 web 组,或者将访问频率限制分组到 api 中。 实际上,默认的 Laravel 5.2 应用结构采用的正是这个方法。例如,在默认 的 App\Http\Kernel \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class0 码力 | 377 页 | 4.56 MB | 1 年前3CakePHP Cookbook Documentation 5.x
Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths Variables (from $_SERVER and $_ENV) XML or JSON Data Path Information Checking Request Conditions Session Data Host and Domain Name Reading the HTTP Method Restricting Which HTTP method an Action Accepts Sessions Session Configuration Built-in Session Handlers & Configuration Session Handlers Database Sessions Cache Sessions Session Locking Setting ini directives Creating a Custom Session Handler Session0 码力 | 1080 页 | 939.39 KB | 1 年前3CakePHP Cookbook 2.x
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’s x 6. The controller may use components to further refine the data or perform other operations (session manipulation, authentication, or sending emails, for example). 7. Once the controller has used models CakePHP configured, but this folder is usually used to store model descriptions, logs, and sometimes session information. Make sure that this folder exists and is writable, or the performance of your application0 码力 | 820 页 | 2.52 MB | 1 年前3CakePHP Cookbook 4.x
Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths Variables (from $_SERVER and $_ENV) XML or JSON Data Path Information Checking Request Conditions Session Data Host and Domain Name Reading the HTTP Method Restricting Which HTTP method an Action Accepts Sessions Session Configuration Built-in Session Handlers & Configuration Session Handlers Database Sessions Cache Sessions Session Locking Setting ini directives Creating a Custom Session Handler Session0 码力 | 1249 页 | 1.04 MB | 1 年前3CakePHP Cookbook 3.x
Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing configuration Additional Class Paths Plugin, View Template and Locale Paths Variables (from $_SERVER and $_ENV) XML or JSON Data Path Information Checking Request Conditions Session Data Host and Domain Name Reading the HTTP Method Restricting Which HTTP method an Action Accepts Sessions Session Configuration Built-in Session Handlers & Configuration Session Handlers Database Sessions Cache Sessions Setting ini directives Creating a Custom Session Handler Accessing the Session Object0 码力 | 1244 页 | 1.05 MB | 1 年前3Laravel 5.1 中文文档
文件和它的文档,其中包含了一些基于你的应用可能需要进行改 变的配置,比如 timezone 和 locale。 你可能还想要配置 Laravel 的一些其它组件,比如: 缓存 数据库 Session Laravel 安装完成后,你还应该配置自己的本地环境,如数据库驱动、邮箱服务器、缓存驱 动等。 2.1.4 美化 URL Apache 框架中自带的 public/.htaccess 1 简介 Laravel 使得防止应用遭到跨站请求伪造攻击变得简单。跨站请求伪造是一种通过伪装授权 用户的请求来利用授信网站的恶意漏洞。 Laravel 自动为每一个被应用管理的有效用户 Session 生成一个 CSRF“令牌”,该令牌用于 验证授权用户和发起请求者是否是同一个人。想要生成包含 CSRF 令牌的隐藏输入字段, 可以使用帮助函数 csrf_field 来实现: session 中的存 储的作对比。 5.2 从 CSRF 保护中排除 URIs 有时候我们想要从 CSRF 保护中排除一些 URIs,比如,如果你在使用 Stripe 来处理支付并 用到他们的 webhook0 码力 | 307 页 | 3.46 MB | 1 年前3CakePHP Cookbook Documentation 5.x
. . . . . 662 28 Sessions 665 Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 Built-in Session Handlers & Configuration . . . . . . . . . . . . . 669 Creating a Custom Session Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 Accessing the Session Object . . . . . . . . . . . . . . . . . . . . . . . . . 671 Reading & Writing Session Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 v Destroying the Session . . . . . . . . . . . . . . . . . . .0 码力 | 848 页 | 2.53 MB | 1 年前3
共 74 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8