11.0介绍

As web applications have matured, the need for statefulness has become a common requirement. Stateful web applications, meaning applications that keep

track of a particular visitor’s information as he travels throughout a site, are now so common that they are taken for granted.

当中web软件应用成熟。它需要充满规定丰富的成为一个必要条件。规定web应用。意思是应用详细的访问者的信息当中一个地点,既然是一个共有的。它们认可
Given the prevalence of web applications that keep track of things for their visitors’such as shopping carts, online banking, personalized home page

portals, and social networking community sites’it is hard to imagine the Internet we use every day without stateful applications.

获得流行的web应用软件,访问者当作购物车。联机银行的私人主页入口和社会网络站点,假设我们每天使用Internet的应用软件
HTTP, the protocol that web servers and clients use to talk to each other, is a stateless protocol by design. However, since PHP 4.0, developers who’ve

built applications with PHP have had a convenient set of session management functions that have made the challenge of implementing statefulness much

easier. This chapter focuses on several good practices to keep in mind while developing stateful applications.
HTTP.这个网络浏览器协议和客户机程序使用彼此。它是一个无国界协议,尽管从PHP4.0开发者建立应用软件和PHP有一套方便的管理函数。它已经获得这个挑战执行非常简

单。这一章集中几个单独的有良好习惯做法的发展中的应用软件
Sessions are focused on maintaining visitor-specific state between requests. Some applications also require an equivalent type of lightweight storage

of non-visitor-specific state for a period of time at the server-side level. This is known as data persistence.

集中维护特殊访问者的请求。一些应用软件同样命令一个相等的类型不匹配的特殊访问者,它们是持续的
Recipe 11.1 explains PHP’s session module, which lets you easily associate persistent data with a user as he moves through your site. Recipes 11.2 and

11.3 explore session hijacking and session fixation vulnerabilities and how to avoid them.

第11.1章说明PHP的模块。哪个是不容易结合持久的数据和一个使用者当作你的移动站点。第11.2章和11.3章探测session hijackin and session fixation弱点和消除他们
Session data is stored in flat files in the server’s /tmp directory by default. Recipes 11.4 and 11.5 explain how to store session data in alternate

locations, such as a database and shared memory, and discusses the pros and cons of these different approaches.

Session数据存储在flat文件在这个服务器/tmp目录默认。第11.4章和11.5章说明怎么去存储session数据在交替的位置。例如一个数据库和公用存储器讨论赞成与反对 

这些不同的方法

Recipe 11.6 demonstrates how to use shared memory for more than just session data storage, and Recipe 11.7 illustrates techniques for longer-term

storage of summary information that has been gleaned from logfiles.
第11.6章证明这么去使用公用存储器对于这些正好的数据保存,在第11.7章举例证明比较久的存储技术概要信息来自这些文件

Comments are closed.