The basic principle is to use a virtual proxy as a placeholder. once a member (method or attribute) of the proxy object is accessed, the loading is triggered. This product was learned from Martin's "Enterprise Application Architecture Model", which
This is a draft. it is very simple. I will go back to some sessions later. Allright, code on
Copy codeThe code is as follows:
Class session
{
Static $ sessionObject;
/* $ _ SESSION ['user'] = 0, don't work.
* = 1, he is really user.
*/
Private
PHP only sends the HTML document header to the browser using the HTTP protocol to tell the browser how to handle the page. As for the transmitted content, you need to familiarize yourself with the HTTP protocol, PHP is irrelevant. in php, the header
Kang Sheng's authcode function can be said to have made significant contributions to the Chinese PHP community. Including Kangsheng's own products, and most Chinese companies that use PHP use this function for encryption. authcode uses exclusive or
By accident, Baidu knows that a student asked about the efficiency of count and strlen. well, I didn't fully understand this problem at the beginning and thought it was not two different things that could not be compared, after reading the reply
PHP verification code. For more information, see. The checkcode. php generates the verification code image and the variable $ _ SESSION [check_pic].
Copy codeThe code is as follows:
Session_start ();
For ($ I = 0; $ I $ Rand. = dechex (rand (1, 15
I have also written many Image upload programs before, but none of them are short below. The simpler the program, the better, right? First, run the source code. you can copy it to your computer to run it ~
Copy codeThe code is as follows:
The purpose of the verification code is needless to say. I also wrote an article about the PHP verification code, the implementation of the PHP verification code. But it is not encapsulated into a class. The following describes a PHP verification
PHP writes the sample code of the Yang Hui triangle. For more information about php Algorithms, see.
Copy codeThe code is as follows:
// Yang Hui triangle
For ($ I = 6; $ I> = 0; $ I --)
{
For ($ j = $ I; $ j {
If ($ j {
Echo"
A";
} Else
Usually there are many sessions and few cookies are used. this is to solve Discuz! Cookie is not required for automatic synchronous login. As a result, the setcookie setting does not take effect and is not displayed on the browser. After checking,
The asort () function sorts arrays and maintains the index relationship. It is mainly used to sort the arrays that are very important to the unit order. The second optional parameter contains an additional sorting identifier.
Asort () definition
The next () function moves the pointer to the current element to the next element and returns the value of this element. If the internal pointer has exceeded the last element of the array, the function returns false.
Next () definition and usage
When I was a beginner in PHP, I read a bad book from the school library, and I didn't write any PHP code in it. when processing the form, it will automatically urldecode, therefore, I used the urldecode function to decode the Discuz X1.5 Forum of
Traditionally, when an array is null, it usually uses count or key, and it is very troublesome to use multi-dimensional arrays.
Copy codeThe code is as follows:
// Determine whether an array is empty
/**
Array (
); Null
Array (
Array (
),
In this article, I will introduce how to dynamically display the user's posted information on the page and play the user's posted information one by one. This effect can be used to display system dynamics, product reviews, and other scenarios. an
This function mainly uses the file modification time function filemtime and the current time-frame subtraction method to determine whether to update the content.
Copy codeThe code is as follows:
// This function uses the file modification time
The upload principle is very simple. you can use the form to open the iframe id, so that you can call the iframe on the current page to upload files and then use js to return the upload results.
Copy codeThe code is as follows:
Upload files
Php checks whether the string is full of Chinese characters or the implementation code that contains Chinese characters. it mainly uses regular expressions to match Chinese characters. I. All judgments are in Chinese.
Copy codeThe code is as
Sometimes, you may need to sort the values in the logarithm group, so you can refer to the following article.
Copy codeThe code is as follows:
$ Full_name = array ();
$ Full_name ["Roger"] = "Waters ";
$ Full_name ["Richard"] = "Wright ";
$
The for loop only has limited number indexes. after the for and foreach traversal ends, you do not need to perform the reset () operation on the data for the next traversal, and the each method is required.
Copy codeThe code is as follows:
//
$ Arr
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