In many cases, we need to encrypt and decrypt data. For example, some data needs to be stored in cookies, but it cannot be easily obtained by users, in this case, we need to encrypt the data and save it to the cookie, and decrypt it when we need to
Some problems need to be treated with a cookie, just read the Rhino book about the introduction of cookies, put together some notes.A cookie is a small amount of data stored by a Web browser, and it is related to a specific Web page or site.The
About IE's session loss problem: For the help of the great Gods of the road
The code is simple.
Session_Start ();Header ("Content-type:text/html;charset=utf-8");Setcookie (' username ', "AA", Time () +3600*24*365);echo "PHPSESSID:". $_cookie['
CI session is not the original session, is my previous cookie based session, in addition, CI can be configured according to the user choose whether the session into the database, I like this function, there is "flash data" function, The flash data
If you have better insights, you can discuss it!Copy codeThe Code is as follows:/** Js Class Cookie* Author: Mr Co*/Var Cookie = function (/* Cookie name */name ){This. $ name = name;Var allcookies = document. cookie;If (allcookies = '') return;Var
JS basics-Cookie and storageI. What is a Cookie?Cookie is a client (browser) technology that stores user information in the form of files to a local hard disk. To put it bluntly, it is a browser technology.Ii. Functions of cookiesCookie is used to
I. What is the browser cross-domain limitation? What is the essence?The so-called cross-Domain browser restrictions, in fact, for data security considerations by Netscape to limit the browser cross-domain access to data policy, this is a convention,
What you need to know: what the instance needs to do is create the cookie object and read the cookie object data, create a cookie through the cookies attribute of the response object, and read the cookie object's data through the request object's
We covered the basic Web schema in the first article and then discussed the structure of the Web application in the second article, and it's time to roll up the sleeves to see HTTP and rest up close.For web developers, it is important to understand
Addslashes
(PHP 4, PHP 5, PHP 7)
Addslashes-quote string with slashes
addslashes-referencing strings with backslashes
Descriptionaddslashes($str)// Returns a string with backslashes added before characters that
This article describes the PHP simulation landing 163 mailbox Email and get address list of methods. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
Header
In the server Security section, I wrote an article on "Cracking the general SQL anti-injection method", said that some of the general anti-injection methods do not filter cookie data, will give hackers the opportunity to leave. Of course, my code
1, and PHP manuals become good friends
2, open the error Reporting
The error reporting is helpful in PHP development. You can find errors in your code that you didn't find before, because not all bugs are going to run the program. When the product
CI is not the session of the original session, it is all of my previous cookie based session, in addition, CI can be selected according to the user configuration will be stored in the database session, I like this function, there is "flash data"
Cookie|cookies is necessary to set up and read cookies in Flash, for example, to provide Web site virtualization in Flash files.
Flash does not support direct settings and read cookies. Therefore, it is generally used JavaScript or ASP scripts
Process for the entire project 1. Building a framework for the entire project "definition of Basic constants" "Implementing a framework requires tradeoffs and a good containment system"2. Database design and Permissions control "user rights to
I wrote a general OOByClassCookie when I was working on the project some days ago. I will share it with you today! If you have better insights, you can discuss it!
The Code is as follows:
/** Js Class Cookie* Author: Mr Co*/Var Cookie = function (
HTML5 Storage APIWeb Storage is a very important feature introduced by HTML5. It can store data locally on the client, similar to the cookie of HTML4, but it has more powerful functions than cookies. Before the emergence of Web Storage, remote Web
This article mainly introduces the details and differences between Cookies and sessions. For more information, see this article, for more information, see
Cookies and Session details and differences
1. cookie is a text string handle sent to the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.