PHP Cookie InstanceHere is a PHP cookie to set the user login time and expiration time code OH
function Logincookie ($uid, $name, $group, $ip, $time){Global $site _domain, $login _key;$domain = (substr ($site _domain,0,4) = = "www.")? substr ($site
/*y:09.05.05A:jimmyLogin*/
The program starts with instructions.
Include ("inc/conn.php");Include ("inc/function.php");
Public files all include in
$integrals = get_value (' integrals ', 0);
$uid = get_value (' id ', 0);
Get the data writing
Correlation function DescriptionOb_start ([string output_callback])-Open output bufferAll output information is not sent directly to the browser , but is stored in the output buffer, which is used to process output information.Ob_end_flush-End (send)
The principle is very simple: The session is recorded on the form page, and then submitted to the page for judgment. If it is equal, it is regarded as successful and the session is cleared.Example The code is as follows:Copy code // Enable
1. First install memcached or memcache softwareSee wamp for detailed instructions on installing memcache/memcached.2. Install php_memcache.dll extension3. Set the session to be saved in memcachedMethod 1:Modify the php. Ini file The code is as
First View ResultsImplementation principleSend request: Send the entered target URL and save path name to image.info asynchronously. php file, which contains an ImageCatch class, Note: Because one is to specify the target image capture, one is to
For functions, we can use the following methods to directly set the timeout time for the function. The code is as follows: Copy code Declare (ticks = 1 );Function (){Sleep (10 );Echo "a
How to implement the Infinitus topic classification idea: get the auto-increment ID (that is, the parent ID) and then obtain the sub-ID (that is, the uid sub-id) data in the database as follows:Id: 1 uid: 0 I'm column 1Id: 2 uid: 1 I'm column 2Id: 3
In this way, after one access, no advertisement will be called. In this way, it's amazing. No advertisement will be skipped. Second, it can increase revenue.The code is as follows: The code is as follows:Copy code Session_start ();$ LifeTime = 2
The code is as follows:Copy code /* Use PHP to collect remote images. Basic process:1. Obtain the image address of the target website.2. Read the image content.3. Create a path to save the image and name the image.4. Write the image content.5.
Let's just move on to the code: The code is as follows:Copy code $ Names = preg_split ('/rn/', $ _ POST ['textarea ']);Foreach ($ names as $ name ){// Todo something eg: echo $ name;} The value is very simple, so the value assignment is not
The total number of pages is a piece of wood with a certain length. The ruler slides on the block. On the premise that the two ends of the ruler cannot exceed the block: D. What we need to do is to find the starting point of the ruler on the block,
The UTF-8 character json_encode is converted into utf16 encoding, that is, the description: The code is as follows:Copy code $./Php/bin/php-r 'echo json_encode ("Chinese ");'"U4e2du6587" Reduced readability, json_encode of the latest php 5.4
The effect is shown in the following figure.HTMLLike the previous article on this site that used raphael. js to draw a map of China, first load the raphael. js library file and the chinamapPath. js path file in the head section. The code is as
A nearly responsible system module is finally coming to an end. The rest of the work is to work with testers to test and modify the module.During this relatively idle time, I secretly wrote several blog posts to record the problems encountered
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service