::getserverstatus– getting parameters to run the servermemcache::getstats– returns some running statistics for the servermemcache::getversion– returns the version information of the running Memcachememcache::increment– an addition to the value in a saved keyMemcache: Create a Memcache Persistent connection object:p connect–Memcache::replace-Overwrite an existing keyMemcache::set– adds a value that, if already present, overwritememcache::setcompressthreshold– compression of data larger than a cer
Non-IE browser "userdata" SOLUTION
GlobalStorage
This is also proposed in html5. After the browser is closed, the information stored in globalStorage can still be retained, and the storage capacity is much larger than that of userdata in IE. The storage capacity of a domain is 5120 kb. Like sessionStorage, information stored on any page in the domain can be shared by all pages.
Scope
GlobalStorage ['z .baidu.com '] All pages under z.baidu.com can use this space.
GlobalStorage ['Baidu. com'] All
running server
Memcache: getStats-return some running statistics of the server
Memcache: getVersion-returns the version information of the running Memcache.
Memcache: increment-adds the value of a saved key.
Memcache: pconnect-creates a persistent connection object for Memcache.
Memcache: replace-overwrite an existing key
Memcache: set-add a value. if it already exists, overwrite it.
Memcache: setCompressThreshold-compresses data larger than a certain size
Memcache: setServerParams-modify serve
A PHP-based Cache callback and automatic triggering technology
Background
When using Memcache or Redis in PHP, we generally encapsulate Memcache and Redis and write a Cache class separately as a proxy for Memcache active Redis, which is generally in singleton mode. In Business Code, the basic sample code for operations when using the Cache class is as follows:
// Cache key $ key = 'this is key'; $ expire = 60; // timeout // cache instance $ cache = W
? Compress data that is larger than a certain size
Memcache::setserverparams? Modifying the server's parameters at run time
Memcache::add usage
BOOL Memcache::add (String $key, mixed $var [, int $flag [, int $expire]])
Description:
If $key does not exist, use this function to store the value of $var. Functions with the same function are Memcache_add ().
Parameters:
$key: The key value that will be stored.
$var: Stored values,
In the ueditor through the syntax to choose PHP, posted to the Web page, can not correctly highlight the following PHP code, who can find the most fundamental problem where?
Ueditor to ' decrypt string ' there, * @return Strin is wrong .... The last g's not coming out.
+----------------------------------------------------------------------Namespace think\crypt\driver;/** * Crypt Cryptographic implementation class * @category org * @package org * @subpackage Crypt * @author liu21st
*/
PHP implementation gets and sets the user Access page language class, can be implemented to get/set user access to the page language, if the user does not set the access language, then read accept-language.A PHP get and set User access page language class, specific analysis:The instance user Language Class gets/sets the page language that the user accesses, and if the user does not set the access language, reads Accept-language.Display the corresponding page according to the language selected by
the cookie, and we define a Java bean to represent the cookie.Package Com.j2medev.lomol.model;Import Com.j2medev.lomol.util.StringUtil;Import Java.io.DataInputStream;Import Java.io.DataOutputStream;Import java.io.IOException;Import Java.util.Date;/*** A cookie stored on the mobile device, cookies are used to maintain the states between client and server* @author Mingjava* @version 0.1 05/06/2006*/public class Cookie {Private String Path = "";Private String name = "";Private String value = "";Pr
parse the cookie, and we define a Java bean to represent the cookie.
Package Com.j2medev.lomol.model;
Import Com.j2medev.lomol.util.StringUtil;Import Java.io.DataInputStream;Import Java.io.DataOutputStream;Import java.io.IOException;Import Java.util.Date;
/*** A cookie stored on the mobile device, cookies are used to maintain the states client and server* @author Mingjava* @version 0.1 05/06/2006*/public class Cookie {
Private String Path = "";Private String name = "";Private String value =
A cache callback and auto-triggering technique based on PHP
Background
When using Memcache or Redis in PHP, we typically encapsulate memcache and Redis, write a cache class individually, as a proxy for Memcache live Redis, and typically a singleton mode. In the business code, when using the cache class, the basic sample code for the operation is as follows
Cache Key$key = ' this is key '; $expire = 60;//Timeout///cache Instance $cache = Wk_cache::in
Distributed memcached Learning (2) -- Basic memcached commands and basic memcached commands
The above section describes how to compile and log on to memcahed in linux. The following describes how to use the basic memcahed commands.
Add
Function: adds a new cache record to the memory.
Syntax: add key flag expire length
Resolution:
Key indicates a unique name for the value to be stored.
Flag, which must be a positive integer
The validity
Copy codeThe Code is as follows: /*************************************** **************************************** **********************
Name shopping cart
Version 1.1:
Author Vanni (fanlin) url: www.27sea.com QQ: 303590170
CreateDate 2005-05-31
Description
This class is based on JavaScript and client cookies. please ensure that the client enables cookies
Data persistence (24*30 hours by default) can be performed through this. expire =? Hours to spec
, no problem.
But just now I said there is a bug that does not count the bug, so the small pits, what is it?If you take over the cache directly with Redis, if it's OK to use it properly, then Redis will get an error when the value of the expiration time exceeds the int range.I used yii2-admin, and it happened that I stepped on the pit because he had cached it for 30 days, that is 2.592 million seconds, and the Redis cache time precision was in milliseconds by default, so time was 2592000000 mill
did not encounter this error = =
http://blog.csdn.net/cdh1213/...
Des algorithm of thinkphp
+----------------------------------------------------------------------Namespace think\crypt\driver;/** * Des Cryptographic implementation class * converted from JavaScript to PHP by Jim Gibbs, June 2004 Paul Tero, July 2001 * Optimised for performance with Lar GE blocks by Michael Hayworth, November 2001 * Http://www.netdealing.com */class Des {/** * encrypted string * @param str ing $str String
command point of view. In Memcache, storage is stored in the same way as a key->value, a key-value corresponding to an element form of a join array, a type that can be stored as a number, a string, an array, an object, etc. In a project, a non-string (number can be considered a numeric string) type of advanced line JSON encoding or serialization is stored in the cache, and then decoded or deserialized when it is fetched. Memcache is a class that PHP specializes in dealing with memcache caches,
Use PHP to manually make webpages expire. detrox [translation]Keyword webpage expired, registration webpage writingSource http://www.phpbuilder.net/columns/clark20030702.php3Manually Expiring Web PagesManual webpage expiration
By Joe ClarkTranslation: detrox
After going through a series of pages during a registration process, you don't want the user to be able to go back after the final submit. what can you do to manually "
results.
With the same usage, no problem.
But just now I said there is a bug that does not count the bug, so the small pits, what is it?If you take over the cache directly with Redis, if it's OK to use it properly, then Redis will get an error when the value of the expiration time exceeds the int range.I used yii2-admin, and it happened that I stepped on the pit because he cached it for 30 days, which is 2.592 million seconds, and the Redis cache time precision is in milliseconds by default, s
problem.But just now I said there is a bug that does not count the bug, so the small pits, what is it?If you take over the cache directly with Redis, if it's OK to use it properly, then Redis will get an error when the value of the expiration time exceeds the int range.I used yii2-admin, and it happened that I stepped on the pit because he had cached it for 30 days, that is 2.592 million seconds, and the Redis cache time precision was in milliseconds by default, so time was 2592000000 milliseco
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.